header.hero {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: var(--shadow);
    padding: 2rem 2rem 1.5rem;
    margin-bottom: 2rem;
}

.eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hb-main h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.8rem, 4vw, 2.35rem);
    line-height: 1.15;
}

.lead {
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.meta {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    font-size: 0.92rem;
    color: var(--muted);
}

.meta [data-reading-time] {
    font-weight: 600;
    color: var(--ink);
}

section {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
}

section h2 {
    margin: 0 0 1rem;
    font-size: 1.35rem;
    color: var(--accent);
}

section h3 {
    margin: 1.5rem 0 0.65rem;
    font-size: 1.05rem;
}

.callout {
    border-left: 4px solid var(--accent);
    background: var(--accent-soft);
    padding: 0.9rem 1rem;
    border-radius: 0 8px 8px 0;
    margin: 1rem 0;
}

.callout.ok {
    border-left-color: #1f6b45;
    background: #e8f5ee;
}

.glossary-list {
    display: grid;
    gap: 0.9rem;
    margin: 0;
}

.glossary-list dt {
    scroll-margin-top: calc(var(--header-height) + 1rem);
    font-weight: 700;
    color: var(--ink);
}

.glossary-list dd {
    margin: -0.55rem 0 0;
    padding: 0 0 0.9rem;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}

.glossary-list dd:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.figure {
    margin: 1.25rem 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfd;
    overflow-x: auto;
}

.figure figcaption {
    margin-top: 0.75rem;
    font-size: 0.92rem;
    color: var(--muted);
}

.figure img.screenshot {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.figure .screenshot-pair {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.9rem;
    align-items: start;
}

.human-review-figure {
    overflow-x: visible;
}

.review-browser-capture {
    overflow: hidden;
    border: 1px solid #1d2a36;
    border-radius: 12px;
    background: #071014;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
}

.review-browser-titlebar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.4rem;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid #1d2a36;
    background: linear-gradient(180deg, #17212d, #0f1a24);
    color: #dceaf3;
    font-size: 0.86rem;
    font-weight: 700;
}

.review-browser-dots {
    display: inline-flex;
    gap: 0.35rem;
    flex: 0 0 auto;
}

.review-browser-dots span {
    width: 0.68rem;
    height: 0.68rem;
    border-radius: 999px;
    background: #38bdf8;
}

.review-browser-dots span:first-child {
    background: #ff5d7d;
}

.review-browser-dots span:nth-child(2) {
    background: #f5a524;
}

.review-browser-dots span:nth-child(3) {
    background: #17c964;
}

.review-browser-title {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-browser-scroll {
    position: relative;
    max-height: clamp(28rem, 72vh, 44rem);
    overflow-x: hidden;
    overflow-y: auto;
    background: #071014;
    cursor: default;
    overscroll-behavior: contain;
    scrollbar-width: none;
}

.review-browser-scroll--audit {
    height: min(clamp(16rem, 40vh, 26rem), 64vw);
}

.review-browser-scroll.is-dragging {
    cursor: grabbing;
}

.review-browser-scroll.is-scrollable {
    cursor: grab;
}

.review-browser-scroll::-webkit-scrollbar {
    display: none;
}

.review-browser-scroll:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: -3px;
}

.review-browser-scroll-cue {
    position: sticky;
    top: 0.9rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 0;
    padding-right: 0.9rem;
    pointer-events: none;
}

.review-browser-scroll:not(.is-scrollable) .review-browser-scroll-cue,
.hb-zoom-frame--scrollable:not(.is-scrollable) .review-browser-scroll-cue {
    display: none;
}

.review-browser-fullscreen-button {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #f8fafc;
    cursor: pointer;
    opacity: 0.82;
}

.review-browser-fullscreen-button:hover,
.review-browser-fullscreen-button:focus-visible {
    background: rgba(248, 250, 252, 0.1);
    opacity: 1;
    outline: 2px solid rgba(248, 250, 252, 0.58);
    outline-offset: 2px;
}

.review-browser-fullscreen-glyph {
    width: 1rem;
    height: 1rem;
    color: currentColor;
    background:
        linear-gradient(currentColor, currentColor) left top / 0.46rem 2px no-repeat,
        linear-gradient(currentColor, currentColor) left top / 2px 0.46rem no-repeat,
        linear-gradient(currentColor, currentColor) right top / 0.46rem 2px no-repeat,
        linear-gradient(currentColor, currentColor) right top / 2px 0.46rem no-repeat,
        linear-gradient(currentColor, currentColor) left bottom / 0.46rem 2px no-repeat,
        linear-gradient(currentColor, currentColor) left bottom / 2px 0.46rem no-repeat,
        linear-gradient(currentColor, currentColor) right bottom / 0.46rem 2px no-repeat,
        linear-gradient(currentColor, currentColor) right bottom / 2px 0.46rem no-repeat;
}

.review-browser-scroll-dot {
    position: relative;
    display: block;
    width: 1.08rem;
    height: 1.08rem;
    border-radius: 999px;
    background: #f8fafc;
    box-shadow:
        0 0 0 0.42rem rgba(248, 250, 252, 0.18),
        0 10px 24px rgba(2, 6, 23, 0.32);
    animation: review-browser-dot-scroll 1.8s ease-in-out infinite;
}

.review-browser-image {
    display: block;
    width: 100%;
    min-width: 0;
    height: auto;
    -webkit-user-drag: none;
    user-select: none;
}

@keyframes review-browser-dot-scroll {
    0%,
    100% {
        opacity: 0.92;
        transform: translateY(0);
    }

    45% {
        opacity: 1;
        transform: translateY(1.15rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .review-browser-scroll-dot {
        animation: none;
    }
}

.figure .hb-zoomable {
    cursor: zoom-in;
}

.figure .hb-zoomable:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.figure svg {
    display: block;
    width: 100%;
    min-width: 640px;
    height: auto;
}

.figure img.team-photo {
    border: none;
}

.role-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem 1.25rem;
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}

.role-list li {
    border-top: 1px solid var(--line);
    padding-top: 0.65rem;
}

.role-list strong {
    display: block;
    color: var(--ink);
}

.process-principles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75rem 1rem;
    margin: 1rem 0;
}

.process-principles div {
    border-top: 1px solid var(--line);
    padding-top: 0.65rem;
}

.process-principles strong {
    display: block;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.94rem;
    margin: 1rem 0;
}

th,
td {
    border: 1px solid var(--line);
    padding: 0.55rem 0.65rem;
    vertical-align: top;
    text-align: left;
}

th {
    background: #f2f6fa;
    font-weight: 600;
}

.legal-data-table th[scope="row"] {
    width: clamp(9.5rem, 24vw, 14rem);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.75rem 0 0;
}

.tag {
    display: inline-block;
    font-size: 0.78rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #eef2f7;
    color: #334155;
    border: 1px solid #dbe3ee;
}

footer.note {
    color: var(--muted);
    font-size: 0.92rem;
    margin-top: 2rem;
}

body.hb-zoom-open {
    overflow: hidden;
}

.hb-zoom-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    grid-template-rows: auto 1fr;
    background: rgba(10, 16, 24, 0.92);
    color: #fff;
}

.hb-zoom-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    min-height: 4rem;
    padding: 0.75rem 1rem;
    background: rgba(10, 16, 24, 0.78);
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.hb-zoom-button {
    min-width: 2.35rem;
    min-height: 2.35rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.hb-zoom-button:hover,
.hb-zoom-button:focus-visible {
    background: #fff;
    color: #111827;
    outline: none;
}

.hb-zoom-button--text {
    padding: 0 0.85rem;
}

.hb-zoom-value {
    min-width: 4rem;
    text-align: center;
    font-weight: 700;
}

.hb-zoom-frame {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    overflow: hidden;
    padding: 1rem;
    touch-action: none;
}

.hb-zoom-frame--scrollable {
    align-items: stretch;
    justify-content: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    cursor: default;
    scrollbar-width: none;
    touch-action: auto;
}

.hb-zoom-frame--scrollable.is-scrollable {
    cursor: grab;
}

.hb-zoom-frame--scrollable.is-dragging {
    cursor: grabbing;
}

.hb-zoom-frame--scrollable::-webkit-scrollbar {
    display: none;
}

.hb-zoom-frame.is-dragging {
    cursor: grabbing;
}

.hb-zoom-content {
    display: block;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 10rem);
    width: auto;
    height: auto;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 70px rgba(0, 0, 0, 0.4);
    transform-origin: center center;
    transition: transform 0.12s ease;
    user-select: none;
}

.hb-zoom-frame--scrollable .hb-zoom-content {
    align-self: center;
    width: min(100%, 1440px);
    max-width: none;
    max-height: none;
    cursor: inherit;
    transform: none !important;
}

.hb-zoom-content.is-zoomed {
    cursor: grab;
    transition: none;
}

svg.hb-zoom-content {
    min-width: 0;
}

.hb-zoom-caption {
    max-width: min(980px, calc(100vw - 2rem));
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.95rem;
    line-height: 1.45;
    text-align: center;
}

.hb-main a {
    color: var(--accent);
}

.handbook-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.handbook-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--line);
}

.handbook-list li:last-child {
    border-bottom: none;
}

@media (max-width: 640px) {
    header.hero {
        padding: 1.25rem 1rem 1rem;
        margin-bottom: 1.25rem;
    }

    section {
        padding: 1.1rem 1rem;
    }

    .figure {
        padding: 0.75rem;
    }

    table {
        table-layout: fixed;
    }

    th,
    td {
        padding: 0.5rem 0.45rem;
        overflow-wrap: anywhere;
        hyphens: auto;
    }
}
