.has-spec-lightbox { overflow: hidden; }
.spec-lightbox, .spec-reading { position: fixed; inset: 1rem; width: calc(100% - 2rem); max-width: 90rem; height: calc(100dvh - 2rem); max-height: none; margin: auto; padding: 0; border: 1px solid var(--color-border-subtle); background: var(--color-surface-page); color: var(--color-text-primary); overflow-y: auto; overscroll-behavior: contain; }
.spec-lightbox::backdrop, .spec-reading::backdrop { background: color-mix(in srgb, var(--color-surface-inverse) 65%, transparent); }
.spec-controls { position: sticky; top: 1rem; z-index: 5; height: 0; display: flex; justify-content: flex-end; padding-inline: 1rem; pointer-events: none; }
.spec-controls button { flex: none; min-height: 2.75rem; border: 0; background: var(--color-surface-page); color: inherit; cursor: pointer; pointer-events: auto; }
.spec-close { width: 2.75rem; padding: 0; font: 300 2rem/1 var(--font-body); }
.spec-back { display: grid; place-items: center; width: max(2.75rem, .65em); height: 1.1em; min-height: 2.75rem; padding: 0; border: 0; background: transparent; color: inherit; font-size: inherit; cursor: pointer; }
.spec-back span { display: block; width: .56em; height: 1em; background: currentColor; mask: url('../media/location-arrow.svg') center / contain no-repeat; transform: rotate(180deg); }
.spec-overview { padding: clamp(4.5rem, 6vw, 6rem) var(--space-page); background: var(--color-surface-page); }
.spec-overview h2, .spec-article h2 { margin: .5rem 0 1.5rem; font: 400 clamp(2.5rem, 6vw, 6rem)/1.1 var(--font-display); overflow-wrap: anywhere; }
.spec-intro { max-width: 35rem; margin-bottom: 3rem; color: var(--color-text-secondary); }
.spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.spec-card { border: 1px solid var(--color-border-control); background: var(--color-surface-page); }
.spec-card summary { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 2rem; min-height: 13rem; padding: clamp(1.25rem, 3vw, 3rem); cursor: pointer; list-style: none; font-size: clamp(1.05rem, 2vw, 1.75rem); }
.spec-card summary::-webkit-details-marker { display: none; }
.spec-card summary:hover { background: var(--color-surface-subtle); }
.spec-card summary:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 4px; }
.spec-card summary > span:first-of-type { padding-right: 1.5rem; }
.spec-icon { width: 3rem; height: 3rem; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.spec-plus { position: absolute; right: 1.5rem; bottom: 1.5rem; }
.spec-copy { padding: 1.5rem; }
.spec-reading { inset: 2rem; width: calc(100% - 4rem); height: calc(100dvh - 4rem); max-width: 64rem; }
.spec-article { --spec-heading-size: clamp(2rem, 4vw, 4rem); max-width: 48rem; margin: auto; padding: 5rem clamp(1.5rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4rem); }
.spec-reading-heading { position: relative; margin: .5rem 0 1.5rem; font-size: var(--spec-heading-size); }
.spec-reading-heading .spec-back { position: absolute; right: calc(100% + .4em); top: 0; }
.spec-reading-heading h2 { margin: 0; font-size: var(--spec-heading-size); }
.spec-article h3 { margin: 2rem 0 .75rem; font-size: 1.15rem; font-weight: 500; }
.spec-article p { margin: .65rem 0; line-height: 1.75; }
.spec-lightbox .site-footer { display: block; padding: 0; }
@media (max-width: 600px) {
  .spec-lightbox { inset: .4rem; width: calc(100% - .8rem); height: calc(100dvh - .8rem); }
  .spec-reading { inset: .8rem; width: calc(100% - 1.6rem); height: calc(100dvh - 1.6rem); }
  .spec-grid { gap: .6rem; }
  .spec-card summary { min-height: 11rem; padding: 1rem; }
  .spec-plus { right: .7rem; bottom: 1rem; }
  .spec-lightbox .contact-fields { grid-template-columns: 1fr; }
  .spec-reading-heading { display: flex; align-items: flex-start; gap: .35em; }
  .spec-reading-heading .spec-back { position: static; flex-shrink: 0; }
  .spec-reading-heading h2 { min-width: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .spec-lightbox[open]::backdrop, .spec-reading[open]::backdrop { animation: spec-backdrop-in .65s cubic-bezier(.22, 1, .36, 1) both; }
  .spec-lightbox.is-spec-closing::backdrop, .spec-reading.is-spec-closing::backdrop { animation: spec-backdrop-out .42s ease both; }
}
@keyframes spec-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes spec-backdrop-out { from { opacity: 1; } to { opacity: 0; } }
