/* Local annotation layer; the portfolio's palette and type remain unchanged. */
.thoras-inspection {
    --inspection-accent: #e34b3f;
    --inspection-ink: #171717;
    --inspection-paper: #f5f3ed;
    --inspection-muted: #b9b8b3;
    --inspection-ease: cubic-bezier(.2, .7, .2, 1);
    position: relative;
    padding: 16px;
    background: #f5f9ff;
    border-radius: 8px;
    isolation: isolate;
}
.inspection__stage { position: relative; }
.inspection__stage > img { display: block; width: 100%; height: auto; border-radius: 8px; }
.inspection__framing {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 12px 0 0;
    color: #404040;
    font-size: 12px;
    line-height: 1.6;
}
.inspection__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    text-align: left;
}
.inspection__toggle:focus-visible, .inspection__marker:focus-visible {
    outline: 2px solid var(--inspection-ink);
    outline-offset: 4px;
}
.inspection__markers { position: absolute; inset: 0; pointer-events: none; }
.inspection__marker {
    position: absolute;
    left: var(--anchor-x);
    top: var(--anchor-y);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
    color: var(--inspection-paper);
    cursor: pointer;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms var(--inspection-ease), visibility 150ms;
}
.inspection__marker::before, .inspection__region::before {
    content: '';
    position: absolute;
    inset: 5px;
    background:
        linear-gradient(currentColor, currentColor) left top / 7px 1px,
        linear-gradient(currentColor, currentColor) left top / 1px 7px,
        linear-gradient(currentColor, currentColor) right top / 7px 1px,
        linear-gradient(currentColor, currentColor) right top / 1px 7px,
        linear-gradient(currentColor, currentColor) left bottom / 7px 1px,
        linear-gradient(currentColor, currentColor) left bottom / 1px 7px,
        linear-gradient(currentColor, currentColor) right bottom / 7px 1px,
        linear-gradient(currentColor, currentColor) right bottom / 1px 7px;
    background-repeat: no-repeat;
}
.inspection__marker::before {
    inset: 6px;
    background: var(--inspection-ink);
    transition: inset 150ms var(--inspection-ease);
}
.inspection__marker::after {
    content: '';
    position: absolute;
    right: 9px;
    top: 9px;
    width: 4px;
    height: 4px;
    background: var(--inspection-accent);
}
.inspection__marker span { position: relative; font: 11px/1 'Roboto Mono', monospace; }
.thoras-inspection[data-revealed] .inspection__marker { visibility: visible; opacity: 1; pointer-events: auto; }
.thoras-inspection[data-active] .inspection__marker[aria-expanded='false'] { opacity: .72; }
.inspection__marker[aria-expanded='true']::before, .inspection__marker:hover::before { inset: 4px; }
.inspection__region {
    position: absolute;
    color: #171717;
    pointer-events: none;
    /* Fine white separation keeps the brackets readable over product UI. */
    filter: drop-shadow(0 1px 0 #fff);
}
.inspection__region::before { inset: 0; }
.inspection__panel {
    position: absolute;
    z-index: 2;
    width: 264px;
    padding: 14px;
    color: var(--inspection-paper);
    background: var(--inspection-ink);
    border-radius: 2px;
    font-size: 12px;
    line-height: 1.5;
    box-shadow: 0 5px 16px rgb(0 0 0 / 10%);
    animation: inspection-reveal 200ms var(--inspection-ease);
}
.inspection__meta, .inspection__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--inspection-muted);
    font: 11px/1.5 'Roboto Mono', monospace;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.inspection__meta { border-bottom: 1px solid #464541; padding-bottom: 8px; }
.inspection__meta span { color: var(--inspection-paper); }
.inspection__meta span::before { content: ''; display: inline-block; width: 5px; height: 5px; margin-right: 8px; background: var(--inspection-accent); vertical-align: 1px; }
.inspection__close { display: grid; place-items: center; width: 44px; height: 44px; margin: -14px -12px -14px 0; color: var(--inspection-muted); }
.inspection__close:hover { color: var(--inspection-paper); }
.inspection__close:focus-visible { outline: 2px solid var(--inspection-paper); outline-offset: -4px; }
.inspection__panel h3 { margin: 10px 0 6px; font-size: 16px; font-weight: 600; line-height: 1.3; }
.inspection__panel p { margin: 0; }
.inspection__footer { border-top: 1px solid #464541; margin-top: 10px; padding-top: 8px; }
.thoras-inspection[data-compact] .inspection__framing { align-items: flex-start; gap: 4px; }
.thoras-inspection[data-compact] .inspection__markers {
    position: static;
    display: none;
    gap: 12px;
    padding: 8px 0 12px;
}
.thoras-inspection[data-compact][data-revealed] .inspection__markers { display: flex; }
.thoras-inspection[data-compact] .inspection__marker { position: relative; left: auto; top: auto; transform: none; }
.thoras-inspection[data-compact] .inspection__panel { position: relative; width: auto; min-height: 196px; box-shadow: none; }
.thoras-inspection [hidden] { display: none !important; }
@keyframes inspection-reveal {
    from { opacity: 0; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .thoras-inspection *, .thoras-inspection *::before { animation: none !important; transition: none !important; }
}
