:root {
    --qb-orange: #F08E36;
    --qb-black: #171717;
    --qb-charcoal: #292929;
    --qb-gray-700: #4a4a4a;
    --qb-gray-500: #777;
    --qb-gray-300: #d8d8d8;
    --qb-gray-150: #eeeeee;
    --qb-gray-075: #f7f7f7;
    --qb-white: #ffffff;
    --qb-radius: 18px;
    --qb-shadow: 0 12px 32px rgba(0,0,0,.07);
    --qb-width: 860px;
}

body.quickbytes-explanation-page {
    margin: 0;
    background: var(--qb-white);
    color: var(--qb-black);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.65;
}

.quickbytes-explanation-page *,
.quickbytes-explanation-page *::before,
.quickbytes-explanation-page *::after { box-sizing: border-box; }

.quickbytes-explanation-page a { color: #8a4709; text-underline-offset: .16em; }
.quickbytes-explanation-page a:hover { color: var(--qb-black); }

.qb-shell { width: min(calc(100% - 36px), var(--qb-width)); margin-inline: auto; }
.qb-skip-link { position: absolute; left: -9999px; top: 8px; z-index: 99999; padding: 10px 14px; background: var(--qb-black); color: var(--qb-white) !important; }
.qb-skip-link:focus { left: 8px; }

.qb-site-header {
    border-bottom: 1px solid var(--qb-gray-150);
    background: rgba(255,255,255,.97);
}
.qb-site-header__inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.qb-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--qb-black) !important; text-decoration: none; font-weight: 800; letter-spacing: -.02em; }
.qb-brand__mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--qb-orange); color: var(--qb-black); font-weight: 900; }
.qb-home-link { color: var(--qb-gray-700) !important; font-size: .94rem; font-weight: 650; text-decoration: none; }

.qb-main { padding: 44px 0 72px; }
.qb-article { display: block; }
.qb-editor-notice { margin-bottom: 24px; padding: 12px 16px; border-left: 4px solid var(--qb-orange); background: #fff5eb; font-weight: 650; }

.qb-taxonomy-line { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.qb-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 10px; border: 1px solid var(--qb-gray-300); border-radius: 999px; background: var(--qb-white); color: var(--qb-gray-700); font-size: .78rem; font-weight: 750; letter-spacing: .02em; }
.qb-chip--accent, .qb-type-study-tip .qb-chip:first-child { border-color: var(--qb-orange); background: var(--qb-orange); color: var(--qb-black); }

.qb-article-header { margin-bottom: 30px; }
.qb-kicker, .qb-section-label { margin: 0 0 7px; color: var(--qb-gray-700); font-size: .76rem; font-weight: 850; letter-spacing: .095em; text-transform: uppercase; }
.qb-type-study-tip .qb-kicker, .qb-type-study-tip .qb-section-label { color: #8a4709; }
.qb-title { max-width: 780px; margin: 0; font-size: clamp(2rem, 6vw, 3.6rem); line-height: 1.06; letter-spacing: -.045em; }
.qb-record-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 14px 0 0; color: var(--qb-gray-500); font-size: .9rem; }
.qb-record-meta span + span::before { content: "•"; margin-right: 18px; }

.qb-answer-card { overflow: hidden; margin: 28px 0 34px; border: 1px solid var(--qb-gray-300); border-radius: var(--qb-radius); box-shadow: var(--qb-shadow); }
.qb-answer-card__prompt, .qb-answer-card__answer { padding: clamp(22px, 5vw, 34px); }
.qb-answer-card__prompt { background: var(--qb-gray-075); }
.qb-answer-card__answer { border-top: 1px solid var(--qb-gray-300); background: var(--qb-white); }
.qb-type-study-tip .qb-answer-card { border-color: #e9a86e; }
.qb-type-study-tip .qb-answer-card__prompt { background: #fff5eb; }
.qb-type-study-tip .qb-answer-card__answer { border-top-color: #e9a86e; }
.qb-prompt { margin: 0; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.28; letter-spacing: -.02em; }
.qb-short-answer { margin: 0; font-size: clamp(1.25rem, 3vw, 1.7rem); font-weight: 750; line-height: 1.38; }

.qb-section { margin: 42px 0; }
.qb-section > h2 { margin: 0 0 14px; font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.2; letter-spacing: -.025em; }
.qb-lead { margin: 0; font-size: clamp(1.08rem, 2.5vw, 1.28rem); line-height: 1.72; }
.qb-prose { font-size: 1.04rem; }
.qb-prose > *:first-child { margin-top: 0; }
.qb-prose > *:last-child { margin-bottom: 0; }
.qb-prose h2, .qb-prose h3 { line-height: 1.24; letter-spacing: -.02em; }
.qb-prose img { max-width: 100%; height: auto; border-radius: 12px; }
.qb-prose figure { margin-inline: 0; }
.qb-prose blockquote { margin-inline: 0; padding: 3px 0 3px 18px; border-left: 4px solid var(--qb-orange); color: var(--qb-gray-700); }
.qb-prose table { width: 100%; border-collapse: collapse; }
.qb-prose th, .qb-prose td { padding: 10px; border: 1px solid var(--qb-gray-300); text-align: left; }

.qb-featured-image { margin: 38px 0; }
.qb-featured-image img { display: block; width: 100%; height: auto; border-radius: var(--qb-radius); }
.qb-callout { margin: 42px 0; padding: 22px 24px; border-left: 5px solid var(--qb-orange); border-radius: 0 12px 12px 0; background: var(--qb-gray-075); }
.qb-callout p:last-child { margin: 0; }
.qb-type-study-tip .qb-callout { background: #fff5eb; }

.qb-video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--qb-radius); background: #000; }
.qb-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.qb-video-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 10px; color: var(--qb-gray-500); font-size: .9rem; }
.qb-video-meta a { font-weight: 700; }

.qb-sources ul { margin: 0; padding-left: 1.25rem; }
.qb-sources li + li { margin-top: 8px; }
.qb-lookup-footer { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-top: 54px; padding-top: 24px; border-top: 1px solid var(--qb-gray-300); }
.qb-lookup-footer p { margin: 0; }
.qb-lookup-footer > p { max-width: 420px; color: var(--qb-gray-500); font-size: .9rem; text-align: right; }
.qb-lookup-code { font-size: 1.4rem; font-weight: 850; letter-spacing: .06em; }

.qb-site-footer { padding: 26px 0 38px; border-top: 1px solid var(--qb-gray-150); background: var(--qb-gray-075); color: var(--qb-gray-500); font-size: .88rem; }
.qb-site-footer p { margin: 0; }

@media (max-width: 620px) {
    .qb-shell { width: min(calc(100% - 28px), var(--qb-width)); }
    .qb-main { padding-top: 30px; }
    .qb-brand__text { font-size: .94rem; }
    .qb-home-link { font-size: .86rem; }
    .qb-record-meta span + span::before { display: none; }
    .qb-record-meta { flex-direction: column; gap: 3px; }
    .qb-lookup-footer { align-items: flex-start; flex-direction: column; }
    .qb-lookup-footer > p { text-align: left; }
}

/* v0.4: shared Site Icon branding. */
.qb-brand__icon {
    display: block;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    flex: 0 0 auto;
}
.qb-brand__icon--large { width: 56px; height: 56px; border-radius: 13px; }
.qb-brand__mark--large { width: 56px; height: 56px; border-radius: 13px; font-size: 1.15rem; }

/* v0.4: educational answers stay collapsed until the learner chooses to reveal them. */
.qb-answer-reveal { border-top: 1px solid var(--qb-gray-300); background: var(--qb-white); }
.qb-answer-reveal > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 58px;
    padding: 14px 22px;
    cursor: pointer;
    list-style: none;
    color: var(--qb-black);
    font-weight: 800;
    text-align: center;
    user-select: none;
}
.qb-answer-reveal > summary::-webkit-details-marker { display: none; }
.qb-answer-reveal > summary::after { content: "+"; font-size: 1.3rem; line-height: 1; }
.qb-answer-reveal[open] > summary::after { content: "−"; }
.qb-answer-reveal > summary:hover { background: var(--qb-gray-075); }
.qb-answer-reveal > summary:focus-visible { outline: 3px solid var(--qb-orange); outline-offset: -3px; }
.qb-answer-reveal .qb-answer-card__answer { border-top: 1px solid var(--qb-gray-300); }

/* v0.4: homepage/manual code lookup shortcode. */
.qb-lookup-module {
    width: min(100%, 760px);
    margin: 32px auto;
    padding: clamp(26px, 5vw, 44px);
    border: 1px solid var(--qb-gray-300);
    border-radius: var(--qb-radius);
    background: var(--qb-white);
    box-shadow: var(--qb-shadow);
    color: var(--qb-black);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.qb-lookup-module * { box-sizing: border-box; }
.qb-lookup-module__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; font-weight: 850; }
.qb-lookup-module__title { margin: 0; font-size: clamp(1.8rem, 5vw, 2.7rem); line-height: 1.1; letter-spacing: -.035em; }
.qb-lookup-module__intro { max-width: 620px; margin: 12px 0 24px; color: var(--qb-gray-700); font-size: 1.03rem; }
.qb-lookup-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.qb-lookup-input {
    width: 100%; min-height: 58px; padding: 10px 16px;
    border: 2px solid var(--qb-gray-300); border-radius: 12px;
    background: var(--qb-white); color: var(--qb-black);
    font: inherit; font-size: clamp(1.15rem, 4vw, 1.45rem); font-weight: 750; letter-spacing: .06em;
}
.qb-lookup-input:focus { border-color: var(--qb-orange); outline: 3px solid rgba(240,142,54,.22); outline-offset: 1px; }
.qb-lookup-button {
    min-width: 92px; min-height: 58px; padding: 10px 24px;
    border: 2px solid var(--qb-orange); border-radius: 12px;
    background: var(--qb-orange); color: var(--qb-black);
    font: inherit; font-weight: 850; cursor: pointer;
}
.qb-lookup-button:hover { filter: brightness(.97); }
.qb-lookup-button:focus-visible { outline: 3px solid var(--qb-black); outline-offset: 2px; }
.qb-lookup-help { margin: 9px 0 0; color: var(--qb-gray-500); font-size: .88rem; }
.qb-lookup-message { margin: 0 0 16px; padding: 12px 14px; border-left: 4px solid var(--qb-orange); background: #fff5eb; font-weight: 650; }

@media (max-width: 520px) {
    .qb-lookup-form { grid-template-columns: 1fr; }
    .qb-lookup-button { width: 100%; }
}

/* v0.5: discovery navigation, homepage modules, and generated landing pages. */
.qb-chip[href] { text-decoration: none; }
.qb-chip[href]:hover { border-color: var(--qb-orange); background: #fff8f1; }
.qb-top-nav { display: flex; align-items: center; gap: 18px; }
.qb-top-nav a { color: var(--qb-gray-700) !important; font-size: .94rem; font-weight: 700; text-decoration: none; }
.qb-top-nav a:hover { color: var(--qb-black) !important; }

.qb-breadcrumbs {
    display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
    margin: 0 0 30px; color: var(--qb-gray-500); font-size: .88rem;
}
.qb-breadcrumbs a { color: var(--qb-gray-700) !important; font-weight: 650; text-decoration: none; }
.qb-breadcrumbs a:hover { text-decoration: underline; }

.qb-directory-hero { max-width: 760px; margin: 0 0 38px; }
.qb-directory-hero h1,
.qb-home-hero h1 { margin: 0; color: var(--qb-black); font-size: clamp(2.25rem, 7vw, 4.35rem); line-height: 1.02; letter-spacing: -.05em; }
.qb-directory-description { margin-top: 18px; color: var(--qb-gray-700); font-size: clamp(1.02rem, 2.6vw, 1.22rem); line-height: 1.7; }
.qb-directory-description > *:first-child { margin-top: 0; }
.qb-directory-description > *:last-child { margin-bottom: 0; }
.qb-directory-section { margin: 42px 0 54px; }

.qb-section-heading { margin-bottom: 20px; }
.qb-section-heading h2 { margin: 0; color: var(--qb-black); font-size: clamp(1.65rem, 4vw, 2.35rem); line-height: 1.15; letter-spacing: -.035em; }

.qb-directory-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.qb-directory-card {
    display: flex; min-height: 190px; flex-direction: column; align-items: flex-start;
    padding: 24px; border: 1px solid var(--qb-gray-300); border-radius: var(--qb-radius);
    background: var(--qb-white); color: var(--qb-black) !important; text-decoration: none !important;
    box-shadow: 0 6px 22px rgba(0,0,0,.045); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.qb-directory-card:hover { transform: translateY(-2px); border-color: #e9a86e; box-shadow: var(--qb-shadow); }
.qb-directory-card:focus-visible { outline: 3px solid var(--qb-orange); outline-offset: 3px; }
.qb-directory-card__eyebrow { margin-bottom: 9px; color: #8a4709; font-size: .74rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.qb-directory-card strong { font-size: 1.35rem; line-height: 1.2; letter-spacing: -.02em; }
.qb-directory-card > span:not(.qb-directory-card__eyebrow) { margin-top: 10px; color: var(--qb-gray-700); line-height: 1.55; }
.qb-directory-card small { margin-top: auto; padding-top: 18px; color: var(--qb-gray-500); font-weight: 650; }
.qb-type-study-tip .qb-directory-card { border-color: #f0c49d; background: #fffaf5; }

.qb-card-list { overflow: hidden; border: 1px solid var(--qb-gray-300); border-radius: var(--qb-radius); background: var(--qb-white); }
.qb-card-row {
    display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 14px;
    padding: 18px 20px; color: var(--qb-black) !important; text-decoration: none !important;
}
.qb-card-row + .qb-card-row { border-top: 1px solid var(--qb-gray-150); }
.qb-card-row:hover { background: var(--qb-gray-075); }
.qb-card-row:focus-visible { position: relative; outline: 3px solid var(--qb-orange); outline-offset: -3px; }
.qb-card-row__number { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--qb-gray-075); color: var(--qb-gray-700); font-size: .82rem; font-weight: 850; }
.qb-card-row--study-tip .qb-card-row__number { background: var(--qb-orange); color: var(--qb-black); }
.qb-card-row__content { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.qb-card-row__content strong { font-size: 1.04rem; line-height: 1.3; }
.qb-card-row__content span { color: var(--qb-gray-700); font-size: .92rem; line-height: 1.45; }
.qb-card-row__arrow { color: var(--qb-gray-500); font-size: 1.25rem; }
.qb-directory-lookup { margin: 58px 0 10px; }
.qb-lookup-module--directory { margin-inline: 0; }

/* Homepage shortcode stays compatible with the active WordPress theme. */
.qb-home-experience {
    width: min(100%, 980px); margin-inline: auto; padding: 14px 0 40px;
    color: var(--qb-black); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.qb-home-experience *, .qb-home-experience *::before, .qb-home-experience *::after { box-sizing: border-box; }
.qb-home-hero { max-width: 820px; padding: clamp(20px, 4vw, 44px) 0 18px; }
.qb-home-hero__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; font-weight: 850; }
.qb-home-hero > p:last-child { max-width: 700px; margin: 20px 0 0; color: var(--qb-gray-700); font-size: clamp(1.05rem, 2.6vw, 1.24rem); line-height: 1.65; }
.qb-home-experience .qb-lookup-module { width: 100%; margin: 28px 0 58px; background: #fffaf5; border-color: #f0c49d; }
.qb-home-experience .qb-explore { margin: 54px 0; }
.qb-home-experience a { text-underline-offset: .16em; }
.qb-how-it-works { margin: 64px 0 18px; padding-top: 46px; border-top: 1px solid var(--qb-gray-150); }
.qb-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.qb-step { padding: 22px; border: 1px solid var(--qb-gray-300); border-radius: var(--qb-radius); background: var(--qb-white); }
.qb-step > span { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 16px; border-radius: 9px; background: var(--qb-orange); color: var(--qb-black); font-weight: 900; }
.qb-step strong { display: block; font-size: 1.08rem; }
.qb-step p { margin: 7px 0 0; color: var(--qb-gray-700); font-size: .94rem; line-height: 1.5; }
.qb-empty-state { padding: 20px; border: 1px dashed var(--qb-gray-300); border-radius: 12px; color: var(--qb-gray-700); }

@media (max-width: 700px) {
    .qb-directory-grid, .qb-steps { grid-template-columns: 1fr; }
    .qb-directory-card { min-height: 160px; }
    .qb-card-row { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 16px 14px; gap: 10px; }
    .qb-card-row__number { width: 34px; height: 34px; }
    .qb-top-nav { gap: 12px; }
}

/* v0.6: physical Set / 60-card product identity. */
.qb-set-product-summary {
    --qb-set-accent: #6B7280;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    padding: 11px 14px;
    border: 1px solid var(--qb-gray-300);
    border-radius: 12px;
    background: var(--qb-white);
    color: var(--qb-gray-700);
    font-size: .9rem;
    line-height: 1.4;
}
.qb-set-product-summary__swatch {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    border: 1px solid rgba(0,0,0,.16);
    border-radius: 5px;
    background: var(--qb-set-accent);
}
.qb-set-product-summary strong { color: var(--qb-black); }
.qb-directory-card--set-color { position: relative; overflow: hidden; }
.qb-directory-card--set-color::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 6px;
    background: var(--qb-set-accent, var(--qb-orange));
}
.qb-set-study-tips { padding-top: 8px; }
.qb-set-study-tips__intro { max-width: 720px; margin: -8px 0 18px; color: var(--qb-gray-700); line-height: 1.6; }
.qb-set-study-tips .qb-card-list { border-color: #f0c49d; }

/* v0.8: clickable breadcrumbs, stronger Quickbytes orange accents, and set navigation. */
.qb-breadcrumbs {
    padding: 9px 0 10px;
    border-bottom: 1px solid #f7d6b9;
}
.qb-breadcrumbs a {
    color: var(--qb-black) !important;
    font-weight: 750;
    text-decoration-line: underline;
    text-decoration-color: var(--qb-orange);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}
.qb-breadcrumbs a:hover {
    color: #6f3606 !important;
    text-decoration-color: var(--qb-orange);
}
.qb-breadcrumbs > span[aria-hidden="true"],
.qb-breadcrumbs__separator {
    color: var(--qb-orange);
    font-weight: 900;
}
.qb-breadcrumbs__current { color: var(--qb-gray-700); font-weight: 650; }
.qb-breadcrumbs--quickbyte { margin-bottom: 20px; }

.qb-section > h2,
.qb-section-heading h2 {
    position: relative;
    padding-left: 14px;
}
.qb-section > h2::before,
.qb-section-heading h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: .12em;
    bottom: .12em;
    width: 4px;
    border-radius: 999px;
    background: var(--qb-orange);
}
.qb-prose h2,
.qb-prose h3 {
    padding-left: 12px;
    border-left: 4px solid var(--qb-orange);
}
.qb-kicker,
.qb-section-label { text-decoration-color: var(--qb-orange); }
.qb-taxonomy-line .qb-chip[href] { border-color: #e9c4a3; }
.qb-taxonomy-line .qb-chip[href]:hover { border-color: var(--qb-orange); background: #fff7ef; }

.qb-card-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, auto) minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    margin: 54px 0 18px;
    padding: 18px 0;
    border-top: 2px solid var(--qb-orange);
    border-bottom: 1px solid #f4d5b8;
}
.qb-card-nav__link {
    display: flex;
    min-height: 108px;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    padding: 16px 18px;
    border: 1px solid var(--qb-gray-300);
    border-radius: 14px;
    background: var(--qb-white);
    color: var(--qb-black) !important;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(0,0,0,.035);
}
.qb-card-nav__link:hover { border-color: var(--qb-orange); background: #fff9f3; }
.qb-card-nav__link:focus-visible { outline: 3px solid var(--qb-orange); outline-offset: 2px; }
.qb-card-nav__link--next { text-align: right; align-items: flex-end; }
.qb-card-nav__eyebrow { color: #78400c; font-size: .76rem; font-weight: 850; letter-spacing: .075em; text-transform: uppercase; }
.qb-card-nav__link strong { max-width: 270px; font-size: 1rem; line-height: 1.3; }
.qb-card-nav__progress {
    display: flex;
    min-width: 150px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 10px 8px;
    text-align: center;
}
.qb-card-nav__progress a,
.qb-card-nav__progress strong { color: var(--qb-black) !important; font-weight: 850; text-decoration-color: var(--qb-orange); }
.qb-card-nav__progress span { color: var(--qb-gray-500); font-size: .8rem; font-weight: 700; }
.qb-card-nav__placeholder { min-height: 1px; }

.qb-lookup-footer { border-top-color: #f0c49d; }
.qb-lookup-code { text-decoration: underline; text-decoration-color: var(--qb-orange); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.qb-site-header { border-top: 4px solid var(--qb-orange); }

@media (max-width: 760px) {
    .qb-card-nav { grid-template-columns: 1fr; }
    .qb-card-nav__progress { order: -1; min-height: 66px; }
    .qb-card-nav__placeholder { display: none; }
    .qb-card-nav__link--next { text-align: left; align-items: flex-start; }
}
