/* Horn & Grain measuring guide release styles (2026-08-09). */

/* The post-257 measuring card contains edge-to-edge labels; preserve the full diagram. */
.ast-article-post.post-257 .post-thumb-img-content img,
.ast-article-post.post-257 .post-thumb img {
    background: #f5f0e7;
    object-fit: contain;
    object-position: center;
}

/* Customer measuring guide — two honest paths for installed handles and bare tangs. */
.single-post .entry-content .hag-measure-hero {
    position: relative;
    max-width: var(--hag-article-image-max-width);
    margin: 0 auto 2rem;
    padding: clamp(1.4rem, 4vw, 2.5rem);
    overflow: hidden;
    background: linear-gradient(135deg, #f5efe5 0%, #fffdf8 72%);
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius-lg);
}

body.postid-257 .ast-single-post-featured-section img,
body.postid-257 header.entry-header .post-thumb img {
    background: #f5f0e7;
    object-fit: contain;
}

.single-post .entry-content .hag-measure-hero::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--wh-gold);
    content: "";
}

.single-post .entry-content .hag-measure-eyebrow {
    margin: 0 0 0.75rem;
    color: #8f3d30;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.5;
}

.single-post .entry-content .hag-measure-lede {
    max-width: 46rem;
    margin: 0;
    color: var(--wh-text);
    font-size: clamp(1.08rem, 2.2vw, 1.35rem);
    line-height: 1.55;
}

.hag-measure-path-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.35rem;
}

.single-post .entry-content .hag-measure-path-links .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.9rem;
    padding: 0.72rem 1.15rem;
    background: var(--wh-text) !important;
    border: 1px solid var(--wh-text) !important;
    color: var(--wh-bg) !important;
    line-height: 1.2;
    text-decoration: none !important;
}

.single-post .entry-content .hag-measure-path-links .button-outline {
    background: transparent !important;
    border-color: var(--wh-accent) !important;
    color: var(--wh-accent) !important;
}

.single-post .entry-content .hag-measure-path-links .button:hover,
.single-post .entry-content .hag-measure-path-links .button:focus-visible {
    background: var(--wh-accent) !important;
    border-color: var(--wh-accent) !important;
    color: var(--wh-white) !important;
}

.hag-measure-promises {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1.25rem;
    margin-top: 1.35rem;
    padding-top: 1rem;
    border-top: 1px solid var(--wh-border);
    color: var(--wh-text-light);
    font-size: 0.88rem;
}

.hag-measure-promises span::before {
    margin-right: 0.45rem;
    color: var(--wh-gold);
    content: "●";
    font-size: 0.65em;
    vertical-align: 0.12em;
}

.single-post .entry-content .hag-measure-overview img {
    height: auto;
    aspect-ratio: 1200 / 630;
    background: #f5f0e7;
    object-fit: contain;
}

.hag-measure-path-grid,
.hag-measure-reading-grid,
.hag-measure-photo-grid,
.hag-measure-terms,
.hag-measure-steps,
.hag-measure-safety,
.hag-measure-worksheet,
.hag-measure-faq {
    max-width: var(--hag-article-image-max-width);
    margin-right: auto;
    margin-left: auto;
}

.hag-measure-path-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.hag-measure-path {
    padding: clamp(1.15rem, 3vw, 1.6rem);
    background: var(--wh-white);
    border: 1px solid var(--wh-border);
    border-top: 4px solid var(--wh-accent);
    border-radius: var(--wh-radius-lg);
    scroll-margin-top: 6.5rem;
}

.single-post .entry-content .hag-measure-hero ~ h2[id] {
    scroll-margin-top: 6.5rem;
}

body.admin-bar.single-post .entry-content .hag-measure-path,
body.admin-bar.single-post .entry-content .hag-measure-hero ~ h2[id] {
    scroll-margin-top: 8.5rem;
}

.hag-measure-path h3 {
    margin: 0.45rem 0 0.65rem;
    font-size: 1.22rem;
    font-weight: 600;
    line-height: 1.3;
}

.hag-measure-path p,
.hag-measure-path ul {
    margin-top: 0;
}

.hag-measure-path ul {
    padding-left: 1.15rem;
}

.hag-measure-path li + li {
    margin-top: 0.35rem;
}

.hag-measure-path-label {
    margin: 0;
    color: #8f3d30;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.11em;
}

.hag-measure-path-label span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-right: 0.4rem;
    background: #f3e7dc;
    border-radius: 50%;
    letter-spacing: 0;
}

.hag-measure-path .hag-measure-answer {
    margin: 1rem 0 0;
    padding: 0.75rem 0.85rem;
    background: var(--wh-surface);
    border-left: 3px solid var(--wh-gold);
    color: var(--wh-text-light);
    font-size: 0.92rem;
}

.hag-measure-safety {
    margin-top: 1.4rem;
    margin-bottom: 2rem;
    padding: 1rem 1.1rem;
    background: #f8eee8;
    border: 1px solid #ead8ce;
    border-left: 4px solid #8f3d30;
    border-radius: var(--wh-radius-lg);
    color: var(--wh-text-light);
}

.hag-measure-safety--quiet {
    background: var(--wh-surface);
    border-color: var(--wh-border);
    border-left-color: var(--wh-gold);
}

.hag-measure-terms {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
}

.hag-measure-terms > div {
    padding: 1rem;
    background: var(--wh-white);
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius-lg);
}

.hag-measure-terms dt {
    margin-bottom: 0.25rem;
    color: var(--wh-text);
    font-weight: 700;
}

.hag-measure-terms dd {
    margin: 0;
    color: var(--wh-text-light);
    font-size: 0.94rem;
    line-height: 1.6;
}

.hag-measure-steps {
    margin-top: 1.4rem;
    margin-bottom: 1.5rem;
    padding: 0;
    list-style: none;
}

.hag-measure-steps > li {
    display: grid;
    grid-template-columns: 2.65rem minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--wh-border);
}

.hag-measure-steps > li:first-child {
    border-top: 1px solid var(--wh-border);
}

.hag-measure-steps > li > span,
.hag-measure-reading-grid section > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    background: var(--wh-text);
    border-radius: 50%;
    color: var(--wh-bg);
    font-size: 0.86rem;
    font-weight: 700;
}

.hag-measure-steps h3,
.hag-measure-reading-grid h3 {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.hag-measure-steps p,
.hag-measure-reading-grid p {
    margin: 0;
    color: var(--wh-text-light);
}

.hag-measure-reading-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1.4rem;
    margin-bottom: 1.5rem;
}

.hag-measure-reading-grid section {
    display: grid;
    grid-template-columns: 2.35rem minmax(0, 1fr);
    gap: 0 0.8rem;
    padding: 1.05rem;
    background: var(--wh-white);
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius-lg);
}

.hag-measure-reading-grid section:last-child {
    grid-column: 1 / -1;
}

.hag-measure-reading-grid section > span {
    grid-row: 1 / span 2;
}

.hag-measure-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
}

.hag-measure-photo-grid > div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.95rem 1rem;
    background: var(--wh-surface);
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius-lg);
}

.hag-measure-photo-grid > div:last-child {
    grid-column: 1 / -1;
}

.hag-measure-photo-grid strong {
    color: #8f3d30;
    font-size: 0.82rem;
    letter-spacing: 0.05em;
}

.hag-measure-photo-grid span {
    color: var(--wh-text-light);
    font-size: 0.93rem;
}

.single-post .entry-content .hag-measure-worksheet {
    margin-top: 1.2rem;
    margin-bottom: 2rem;
    padding: clamp(1rem, 3vw, 1.5rem);
    overflow-x: auto;
    white-space: pre-wrap;
    background: #332b24;
    border: 1px solid #4a3c31;
    border-radius: var(--wh-radius-lg);
    color: #fffaf1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.86rem;
    line-height: 1.75;
    tab-size: 2;
}

.hag-measure-faq {
    margin-top: 1.25rem;
    margin-bottom: 2rem;
    border-top: 1px solid var(--wh-border);
}

.hag-measure-faq details {
    border-bottom: 1px solid var(--wh-border);
}

.hag-measure-faq summary {
    min-height: 3rem;
    padding: 0.9rem 2rem 0.9rem 0;
    cursor: pointer;
    color: var(--wh-text);
    font-weight: 600;
    line-height: 1.45;
}

.hag-measure-faq details[open] summary {
    color: #8f3d30;
}

.hag-measure-faq details p {
    margin: 0;
    padding: 0 2rem 1rem 0;
    color: var(--wh-text-light);
}

.hag-measure-faq summary:focus-visible,
.hag-measure-path-links a:focus-visible {
    outline: 3px solid #8f3d30;
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .single-post .entry-content .hag-measure-hero {
        padding: 1.25rem 1.1rem;
    }

    .hag-measure-path-links,
    .hag-measure-promises {
        align-items: stretch;
        flex-direction: column;
    }

    .hag-measure-path-links .button {
        width: 100%;
        text-align: center;
    }

    .hag-measure-path-grid,
    .hag-measure-terms,
    .hag-measure-reading-grid,
    .hag-measure-photo-grid {
        grid-template-columns: 1fr;
    }

    .hag-measure-reading-grid section:last-child,
    .hag-measure-photo-grid > div:last-child {
        grid-column: auto;
    }

    .hag-measure-steps > li {
        grid-template-columns: 2.25rem minmax(0, 1fr);
        gap: 0.7rem;
    }

    .hag-measure-steps > li > span,
    .hag-measure-reading-grid section > span {
        width: 2.1rem;
        height: 2.1rem;
    }

    .hag-measure-reading-grid section {
        grid-template-columns: 2.1rem minmax(0, 1fr);
        padding: 0.95rem;
    }

    .single-post .entry-content .hag-measure-worksheet {
        font-size: 0.76rem;
        line-height: 1.7;
    }
}

@media print {
    .hag-measure-path-links,
    .hag-guide-actions {
        display: none !important;
    }

    .single-post .entry-content .hag-measure-hero,
    .hag-measure-path,
    .hag-measure-reading-grid section,
    .hag-measure-photo-grid > div,
    .hag-fit-card,
    .hag-measure-terms > div,
    .hag-measure-worksheet {
        break-inside: avoid;
        box-shadow: none;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .hag-measure-faq details > * {
        display: block !important;
    }
}
