/* =========================================================
   UPTEST BLOG — PÁGINA INDIVIDUAL DE POST
   Carregar DEPOIS de blog-home.css
   ========================================================= */

body.uptest-blog-post {
    --uptest-post-content-width: 860px;
    --uptest-post-reading-width: 74ch;
    --uptest-post-soft-blue: #f3f7ff;
    --uptest-post-soft-green: #f2f8f5;
    --uptest-post-soft-amber: #fff8e8;
    --uptest-post-soft-gray: #f7f8fa;
    --uptest-post-table-head: #eef4ff;
    --uptest-post-table-stripe: #fafbfc;
}

/* ---------- Estrutura e ritmo de leitura ---------- */

.uptest-blog-post article.uptest-blog-wrap {
    max-width: var(--uptest-post-content-width);
}

.uptest-blog-post article > div {
    color: var(--uptest-blog-text, #172033);
    font-size: clamp(1rem, 1.2vw, 1.075rem);
    line-height: 1.78;
}

.uptest-blog-post article > div > p:first-child {
    font-size: 1.08em;
    line-height: 1.75;
}

.uptest-blog-post article > div p {
    margin: 0 0 1.35em;
}

.uptest-blog-post article > div h2 {
    position: relative;
    margin: 2.35em 0 0.8em;
    padding-top: 0.15em;
    color: var(--uptest-blog-text, #172033);
    font-size: clamp(1.55rem, 3vw, 2rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.uptest-blog-post article > div h2::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    margin-top: 10px;
    border-radius: 999px;
    background: var(--uptest-blog-accent, #2557d6);
}

.uptest-blog-post article > div h3 {
    margin: 1.9em 0 0.72em;
    color: var(--uptest-blog-text, #172033);
    font-size: clamp(1.22rem, 2.5vw, 1.5rem);
    line-height: 1.3;
}

.uptest-blog-post article > div h4 {
    margin: 1.65em 0 0.65em;
    color: var(--uptest-blog-text, #172033);
    font-size: 1.08rem;
    line-height: 1.35;
}

.uptest-blog-post article > div strong {
    color: #101828;
    font-weight: 800;
}

.uptest-blog-post article > div hr {
    margin: 2.5em 0;
    border: 0;
    border-top: 1px solid var(--uptest-blog-border, #d9e0e8);
}

/* ---------- Links ---------- */

.uptest-blog-post article > div a {
    color: var(--uptest-blog-accent-dark, #173d9c);
    font-weight: 700;
    text-decoration-line: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
}

.uptest-blog-post article > div a:hover,
.uptest-blog-post article > div a:focus-visible {
    color: var(--uptest-blog-accent, #2557d6);
}

.uptest-blog-post article > div a:focus-visible {
    border-radius: 4px;
    outline: 3px solid rgba(37, 87, 214, 0.18);
    outline-offset: 3px;
}

/* ---------- Tabelas: bordas externas e internas ---------- */

.uptest-blog-post article > div table {
    width: 100%;
    margin: 1.8em 0 2em;
    border: 1px solid #cfd7e3;
    border-collapse: collapse;
    border-spacing: 0;
    background: #ffffff;
    color: var(--uptest-blog-text, #172033);
    font-size: 0.94rem;
    line-height: 1.5;
}

.uptest-blog-post article > div th,
.uptest-blog-post article > div td {
    padding: 12px 14px;
    border: 1px solid #cfd7e3;
    vertical-align: top;
    text-align: left;
}

.uptest-blog-post article > div th {
    background: var(--uptest-post-table-head);
    color: #15254d;
    font-weight: 800;
}

.uptest-blog-post article > div tbody tr:nth-child(even) td {
    background: var(--uptest-post-table-stripe);
}

.uptest-blog-post article > div tbody tr:hover td {
    background: #f3f6fa;
}

.uptest-blog-post article > div caption {
    padding: 0 0 10px;
    color: var(--uptest-blog-muted, #667085);
    font-size: 0.86rem;
    font-weight: 700;
    text-align: left;
}

/* ---------- Listas com leitura visual ---------- */

.uptest-blog-post article > div ul {
    margin: 0 0 1.6em;
    padding: 0;
    list-style: none;
}

.uptest-blog-post article > div ul > li {
    position: relative;
    margin: 0 0 0.72em;
    padding-left: 2em;
}

.uptest-blog-post article > div ul > li::before {
    content: "✓";
    position: absolute;
    top: 0.12em;
    left: 0;
    display: inline-grid;
    width: 1.35em;
    height: 1.35em;
    place-items: center;
    border: 1px solid #b8c8eb;
    border-radius: 50%;
    background: var(--uptest-post-soft-blue);
    color: var(--uptest-blog-accent-dark, #173d9c);
    font-size: 0.76em;
    font-weight: 900;
    line-height: 1;
}

.uptest-blog-post article > div ul ul {
    margin-top: 0.65em;
    margin-bottom: 0.4em;
}

.uptest-blog-post article > div ol {
    margin: 0 0 1.6em;
    padding: 0;
    list-style: none;
    counter-reset: uptest-post-step;
}

.uptest-blog-post article > div ol > li {
    position: relative;
    margin: 0 0 0.78em;
    padding-left: 2.35em;
    counter-increment: uptest-post-step;
}

.uptest-blog-post article > div ol > li::before {
    content: counter(uptest-post-step);
    position: absolute;
    top: 0.08em;
    left: 0;
    display: inline-grid;
    width: 1.55em;
    height: 1.55em;
    place-items: center;
    border-radius: 50%;
    background: var(--uptest-blog-accent, #2557d6);
    color: #ffffff;
    font-size: 0.76em;
    font-weight: 900;
    line-height: 1;
}

/* Lista explicitamente marcada como perguntas. */
.uptest-blog-post article > div :is(.uptest-blog-question-list, .question-list) > li::before {
    content: "?";
    border-color: #e3c979;
    background: var(--uptest-post-soft-amber);
    color: #7a5a00;
}

/* Checklist explícito — alias útil para o gerador de posts. */
.uptest-blog-post article > div :is(.uptest-blog-checklist, .checklist) > li::before {
    content: "✓";
    border-color: #a9d0b8;
    background: var(--uptest-post-soft-green);
    color: #24633c;
}

/* ---------- Blocos de destaque / callouts ---------- */

.uptest-blog-post article > div blockquote,
.uptest-blog-post article > div :is(.uptest-blog-highlight, .highlight-box),
.uptest-blog-post article > div :is(.uptest-blog-key-point, .key-point),
.uptest-blog-post article > div :is(.uptest-blog-note, .note-box),
.uptest-blog-post article > div :is(.uptest-blog-warning, .warning-box) {
    position: relative;
    margin: 2em 0;
    padding: 20px 22px 20px 58px;
    border: 1px solid #d7e1f4;
    border-left: 4px solid var(--uptest-blog-accent, #2557d6);
    border-radius: 14px;
    background: var(--uptest-post-soft-blue);
    box-shadow: 0 7px 22px rgba(23, 32, 51, 0.045);
}

.uptest-blog-post article > div blockquote::before,
.uptest-blog-post article > div :is(.uptest-blog-highlight, .highlight-box)::before {
    content: "i";
    position: absolute;
    top: 18px;
    left: 18px;
    display: inline-grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 50%;
    background: var(--uptest-blog-accent, #2557d6);
    color: #ffffff;
    font-size: 0.82rem;
    font-style: normal;
    font-weight: 900;
}

.uptest-blog-post article > div :is(.uptest-blog-key-point, .key-point)::before {
    content: "★";
    position: absolute;
    top: 18px;
    left: 17px;
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: var(--uptest-blog-accent, #2557d6);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
}

.uptest-blog-post article > div :is(.uptest-blog-note, .note-box) {
    border-color: #d8dde5;
    border-left-color: #667085;
    background: var(--uptest-post-soft-gray);
}

.uptest-blog-post article > div :is(.uptest-blog-note, .note-box)::before {
    content: "i";
    position: absolute;
    top: 18px;
    left: 18px;
    display: inline-grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 50%;
    background: #667085;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 900;
}

.uptest-blog-post article > div :is(.uptest-blog-warning, .warning-box) {
    border-color: #ead7a0;
    border-left-color: #b98500;
    background: var(--uptest-post-soft-amber);
}

.uptest-blog-post article > div :is(.uptest-blog-warning, .warning-box)::before {
    content: "!";
    position: absolute;
    top: 18px;
    left: 18px;
    display: inline-grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 50%;
    background: #9b7200;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 900;
}

.uptest-blog-post article > div blockquote > :last-child,
.uptest-blog-post article > div :is(.uptest-blog-highlight, .highlight-box) > :last-child,
.uptest-blog-post article > div :is(.uptest-blog-key-point, .key-point) > :last-child,
.uptest-blog-post article > div :is(.uptest-blog-note, .note-box) > :last-child,
.uptest-blog-post article > div :is(.uptest-blog-warning, .warning-box) > :last-child {
    margin-bottom: 0;
}

/* ---------- Imagens internas e legendas ---------- */

.uptest-blog-post article > div figure {
    margin: 2em 0;
}

.uptest-blog-post article > div figure img,
.uptest-blog-post article > div > img {
    width: 100%;
    height: auto;
    border: 1px solid var(--uptest-blog-border, #d9e0e8);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(23, 32, 51, 0.05);
}

.uptest-blog-post article > div figcaption {
    margin-top: 9px;
    color: var(--uptest-blog-muted, #667085);
    font-size: 0.82rem;
    line-height: 1.5;
    text-align: center;
}

/* ---------- Código / termos técnicos ---------- */

.uptest-blog-post article > div :not(pre) > code {
    padding: 0.12em 0.35em;
    border: 1px solid #dce2ea;
    border-radius: 5px;
    background: #f5f7fa;
    color: #344054;
    font-size: 0.9em;
}

/* ---------- Responsividade ---------- */

@media (max-width: 700px) {
    .uptest-blog-post article > div {
        line-height: 1.72;
    }

    .uptest-blog-post article > div table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .uptest-blog-post article > div th,
    .uptest-blog-post article > div td {
        min-width: 138px;
        padding: 10px 11px;
    }

    .uptest-blog-post article > div blockquote,
    .uptest-blog-post article > div :is(.uptest-blog-highlight, .highlight-box),
    .uptest-blog-post article > div :is(.uptest-blog-key-point, .key-point),
    .uptest-blog-post article > div :is(.uptest-blog-note, .note-box),
    .uptest-blog-post article > div :is(.uptest-blog-warning, .warning-box) {
        padding: 18px 18px 18px 52px;
    }
}

@media (max-width: 520px) {
    .uptest-blog-post article > div h2 {
        margin-top: 2em;
    }

    .uptest-blog-post article > div ul > li {
        padding-left: 1.85em;
    }

    .uptest-blog-post article > div ol > li {
        padding-left: 2.15em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .uptest-blog-post article > div tbody tr td {
        transition: none;
    }
}

/* =========================================================
   SUPERFÍCIE DE LEITURA DO POST
   ========================================================= */

.uptest-blog-post article.uptest-blog-wrap {
    max-width: 940px;
    padding: clamp(28px, 4vw, 40px);
    border-radius: 18px;
    background: var(--uptest-blog-surface);
}

/* Mobile: aproveitamento máximo da área de leitura */
@media (max-width: 520px) {
    .uptest-blog-post article.uptest-blog-wrap {
        width: calc(100% - 8px);
        padding: 18px 10px 26px;
        border-radius: 10px;
    }
}