:root {
    color-scheme: dark;
    --background: #07090d;
    --surface: #0d1118;
    --surface-soft: #111722;
    --border: rgba(255, 255, 255, 0.14);
    --border-strong: rgba(255, 255, 255, 0.24);
    --text: #f4f6fa;
    --muted: #abb3c1;
    --quiet: #77808f;
    --cyan: #47c8ff;
    --magenta: #f45bd1;
    --display: "Anta", "Arial Black", sans-serif;
    --eyebrow: "Offside", "Trebuchet MS", sans-serif;
    --body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --support: "Sora", "Aptos", "Segoe UI", sans-serif;
    --mono: "SFMono-Regular", "Cascadia Code", Consolas, "Liberation Mono", monospace;
    --page: 1080px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--background);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 80% 3%, rgba(90, 91, 255, 0.12), transparent 28rem),
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        var(--background);
    background-size: auto, 40px 40px, 40px 40px, auto;
    font-family: var(--body);
    line-height: 1.62;
}

body.gallery-open {
    overflow: hidden;
}

body::before {
    position: fixed;
    z-index: 20;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    content: "";
    background: linear-gradient(90deg, var(--cyan), #6e75ff 52%, var(--magenta));
}

::selection {
    color: var(--background);
    background: var(--cyan);
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

a:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 4px;
}

.shell {
    width: min(calc(100% - 3rem), var(--page));
    margin: 0 auto;
}

.site-header {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.brand,
.product-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text);
    font-family: var(--eyebrow);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.brand::before {
    width: 20px;
    height: 2px;
    content: "";
    background: linear-gradient(90deg, var(--cyan), var(--magenta));
}

.product-mark img {
    width: 32px;
    height: 32px;
    aspect-ratio: 1;
    border-radius: 8px;
    object-fit: contain;
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: clamp(0.85rem, 2.5vw, 1.7rem);
    color: var(--muted);
    font-family: var(--eyebrow);
    font-size: 0.74rem;
}

.site-header nav a {
    text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--cyan);
    text-underline-offset: 0.45rem;
}

.hero {
    display: grid;
    align-items: center;
    gap: clamp(3rem, 9vw, 8rem);
    padding: clamp(5rem, 10vw, 8rem) 0;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 250px);
}

.hero-copy {
    max-width: 720px;
}

.eyebrow,
.section-label,
dt,
.updated {
    margin: 0 0 0.8rem;
    color: var(--cyan);
    font-family: var(--eyebrow);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2 {
    margin-top: 0;
    color: var(--text);
    font-family: var(--display);
    font-weight: 400;
    letter-spacing: 0.035em;
    line-height: 1.08;
    text-wrap: balance;
    text-transform: uppercase;
}

h1 {
    max-width: 12ch;
    margin-bottom: 1.2rem;
    font-size: clamp(3.25rem, 8vw, 6rem);
    font-weight: 400;
    letter-spacing: 0.035em;
}

h2 {
    margin-bottom: 1rem;
    font-size: clamp(2rem, 4.5vw, 3.35rem);
    font-weight: 400;
    letter-spacing: 0.035em;
}

p,
li,
dd,
td {
    color: var(--muted);
}

.lede {
    margin: 0 0 1rem;
    color: var(--text);
    font-size: clamp(1.25rem, 2.4vw, 1.6rem);
}

.hero-copy > p:not(.eyebrow):not(.lede) {
    max-width: 650px;
}

.caveat {
    font-size: 0.92rem;
}

.hero-icon {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 24%;
    object-fit: contain;
    filter: drop-shadow(0 18px 55px rgba(86, 91, 255, 0.25));
}

.actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.8rem;
}

.button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.95rem;
    border: 1px solid var(--border-strong);
    color: var(--text);
    background: transparent;
    font-family: var(--support);
    font-size: 0.86rem;
    font-weight: 650;
    letter-spacing: 0;
    text-decoration: none;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.button:hover {
    border-color: var(--cyan);
    background: rgba(71, 200, 255, 0.07);
}

.button.primary {
    border-color: var(--text);
    color: var(--background);
    background: var(--text);
}

.button.primary:hover {
    border-color: var(--cyan);
    background: var(--cyan);
}

.project-facts {
    display: grid;
    margin: 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    grid-template-columns: repeat(4, 1fr);
}

.project-facts div {
    padding: 1.25rem 1.5rem;
    border-right: 1px solid var(--border);
}

.project-facts div:first-child {
    padding-left: 0;
}

.project-facts div:last-child {
    border-right: 0;
}

.project-facts dt {
    margin-bottom: 0.25rem;
    color: var(--quiet);
}

.project-facts dd {
    margin: 0;
    color: var(--text);
    font-size: 0.92rem;
}

.compatibility-note {
    margin-top: 1.35rem;
    padding: 1rem 1.1rem;
    border-left: 2px solid var(--magenta);
    color: var(--quiet);
    background: rgba(244, 91, 209, 0.045);
    font-size: 0.84rem;
}

.compatibility-note strong {
    color: var(--text);
}

.project-section {
    display: grid;
    gap: clamp(2.5rem, 7vw, 6rem);
    padding: clamp(5rem, 9vw, 7.5rem) 0;
    border-bottom: 1px solid var(--border);
    grid-template-columns: minmax(230px, 0.75fr) minmax(0, 1.25fr);
}

.section-heading h2 {
    max-width: 13ch;
}

.section-copy > :first-child {
    margin-top: 0;
}

.section-copy > :last-child {
    margin-bottom: 0;
}

.section-copy a {
    color: var(--cyan);
}

.proof-figure,
.table-wrap,
.mode-note {
    grid-column: 1 / -1;
}

.proof-figure {
    margin: 0;
}

.proof-figure picture {
    display: block;
    padding: clamp(0.45rem, 1vw, 0.75rem);
    border: 1px solid var(--border-strong);
    background: #090c11;
}

.proof-figure img {
    width: 100%;
    height: auto;
}

.proof-figure figcaption {
    margin-top: 0.8rem;
    color: var(--quiet);
    font-size: 0.8rem;
}

.field-notes {
    position: relative;
}

.evidence-desk {
    display: grid;
    border-top: 1px solid var(--border-strong);
    border-bottom: 1px solid var(--border-strong);
    background: rgba(7, 9, 13, 0.72);
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.55fr);
}

.evidence-stage {
    min-width: 0;
    margin: 0;
}

.evidence-canvas {
    position: relative;
    display: grid;
    width: 100%;
    height: clamp(500px, 59vw, 660px);
    overflow: hidden;
    place-items: center;
    padding: clamp(0.8rem, 2vw, 1.5rem);
    border: 0;
    border-right: 1px solid var(--border);
    color: inherit;
    background:
        linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px),
        #090c11;
    background-size: 42px 42px;
    cursor: zoom-in;
}

.evidence-canvas > img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    pointer-events: none;
    user-select: none;
}

/* Tall portrait captures crop to a 3:4 stage view instead of pillarboxing.
   The object-position must match portraitPosition in gallery.js. */
.evidence-canvas.is-portrait > img {
    width: auto;
    height: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: 50% 18%;
}

.evidence-mode-badge {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 0;
    padding: 0.55rem 0.7rem;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    background: rgba(7, 9, 13, 0.94);
    font-family: var(--mono);
    font-size: 0.64rem;
    letter-spacing: 0.07em;
    line-height: 1;
    text-transform: uppercase;
}

.evidence-mode-badge.is-without {
    color: var(--magenta);
}

.evidence-mode-badge.is-with {
    color: var(--cyan);
}

.evidence-mode-badge.is-install {
    color: var(--text);
    background:
        linear-gradient(90deg, rgba(71, 200, 255, 0.16), rgba(244, 91, 209, 0.16)),
        rgba(7, 9, 13, 0.94);
}

.evidence-canvas:focus-visible {
    z-index: 2;
}

.evidence-markers,
.dialog-markers {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.evidence-marker {
    position: absolute;
    display: grid;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--cyan);
    color: var(--text);
    background: rgba(7, 9, 13, 0.94);
    font-family: var(--mono);
    font-size: 0.66rem;
    line-height: 1;
    transform: translate(-50%, -50%);
}

.evidence-marker::after {
    position: absolute;
    inset: -5px;
    content: "";
    border: 1px solid rgba(244, 91, 209, 0.38);
}

.evidence-lens {
    position: absolute;
    z-index: 4;
    display: none;
    width: min(455px, calc(100% - 32px));
    height: 180px;
    overflow: hidden;
    border: 1px solid var(--cyan);
    background-color: #090c11;
    background-repeat: no-repeat;
    box-shadow:
        0 0 0 5px rgba(7, 9, 13, 0.82),
        0 0 28px rgba(71, 200, 255, 0.2);
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.evidence-lens.is-visible {
    display: block;
}

.evidence-magnify {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0.75rem;
    border-top: 1px solid var(--border);
    color: var(--quiet);
    background: rgba(7, 9, 13, 0.9);
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.evidence-stage figcaption {
    display: grid;
    gap: 1.2rem;
    min-height: 112px;
    align-items: start;
    padding: 1.1rem 1.25rem 1.25rem;
    border-top: 1px solid var(--border);
    border-right: 1px solid var(--border);
    grid-template-columns: auto minmax(0, 1fr);
}

.evidence-count,
.annotation-label,
.annotation-phase {
    color: var(--quiet);
    font-family: var(--mono);
    font-size: 0.64rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.evidence-stage figcaption strong {
    display: block;
    color: var(--text);
    font-family: var(--support);
    font-size: 0.96rem;
    line-height: 1.4;
}

.evidence-stage figcaption strong + span {
    display: block;
    margin-top: 0.35rem;
    color: var(--quiet);
    font-size: 0.78rem;
}

.annotation-rail {
    display: flex;
    min-width: 0;
    padding: 1.25rem;
    flex-direction: column;
}

.annotation-rail > div:first-child {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.annotation-label,
.annotation-phase {
    margin: 0;
}

.annotation-label {
    color: var(--text);
}

.annotation-phase {
    margin-top: 0.35rem;
}

.annotation-rail ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.annotation-rail li {
    display: grid;
    gap: 0.85rem;
    padding: 1.15rem 0;
    border-bottom: 1px solid var(--border);
    grid-template-columns: 28px minmax(0, 1fr);
}

.annotation-rail li > span {
    display: grid;
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--cyan);
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.62rem;
}

.annotation-rail li p {
    margin: 0;
    color: var(--quiet);
    font-size: 0.77rem;
    line-height: 1.55;
}

.annotation-rail li strong {
    display: block;
    margin-bottom: 0.22rem;
    color: var(--text);
    font-family: var(--support);
    font-size: 0.8rem;
}

.evidence-source {
    margin-top: auto;
    padding-top: 1rem;
    color: var(--cyan);
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.04em;
    text-underline-offset: 0.3rem;
    text-transform: uppercase;
}

.evidence-action {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--text);
    color: var(--background);
    background: var(--text);
    font-family: var(--support);
    font-size: 0.76rem;
    font-weight: 650;
    text-decoration: none;
}

.evidence-action:hover,
.evidence-action:focus-visible {
    border-color: var(--cyan);
    background: var(--cyan);
}

.evidence-action[hidden] {
    display: none;
}

.evidence-action:not([hidden]) + .evidence-source {
    margin-top: 0.9rem;
}

.evidence-index {
    display: grid;
    border-top: 1px solid var(--border-strong);
    grid-column: 1 / -1;
    grid-template-columns: 1.15fr 1fr 1fr 0.82fr 0.96fr 0.58fr;
}

.evidence-tab {
    display: grid;
    min-width: 0;
    min-height: 142px;
    align-content: space-between;
    gap: 0.8rem;
    padding: 0.8rem;
    border: 0;
    border-right: 1px solid var(--border);
    border-bottom: 2px solid transparent;
    color: var(--quiet);
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.evidence-tab:last-child {
    border-right: 0;
}

.evidence-tab[aria-selected="true"] {
    border-bottom-color: var(--cyan);
    color: var(--text);
    background: rgba(71, 200, 255, 0.045);
}

.evidence-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.025);
}

.evidence-tab img {
    width: 100%;
    height: 78px;
    object-fit: contain;
    object-position: center;
    pointer-events: none;
}

.evidence-tab span {
    display: grid;
    gap: 0.15rem;
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.04em;
    line-height: 1.35;
    text-transform: uppercase;
}

.evidence-tab span b {
    color: currentColor;
    font-weight: 400;
}

.evidence-tab span small {
    color: var(--quiet);
    font-size: inherit;
}

.evidence-tab[data-mode="without"] span small {
    color: var(--magenta);
}

.evidence-tab[data-mode="with"] span small {
    color: var(--cyan);
}

.evidence-tab[data-mode="install"] span small {
    color: var(--text);
}

.evidence-tab[data-mode="install"][aria-selected="true"] {
    border-bottom-color: var(--magenta);
    background:
        linear-gradient(90deg, rgba(71, 200, 255, 0.045), rgba(244, 91, 209, 0.065));
}

.gallery-noscript {
    padding: 1rem;
    border: 1px solid var(--border);
    grid-column: 1 / -1;
}

.gallery-noscript a {
    color: var(--cyan);
}

.evidence-dialog {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--text);
    background: rgba(5, 7, 11, 0.98);
}

.evidence-dialog::backdrop {
    background: rgba(0, 0, 0, 0.9);
}

.evidence-dialog-shell {
    display: grid;
    height: 100dvh;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.evidence-dialog header,
.evidence-dialog footer {
    position: relative;
    z-index: 2;
    display: grid;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border-color: var(--border);
    background: rgba(7, 9, 13, 0.96);
}

.evidence-dialog header {
    border-bottom: 1px solid var(--border);
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.evidence-dialog header > span {
    color: var(--quiet);
    font-family: var(--mono);
    font-size: 0.66rem;
}

.evidence-dialog[data-mode="without"] header > span {
    color: var(--magenta);
}

.evidence-dialog[data-mode="with"] header > span {
    color: var(--cyan);
}

.evidence-dialog[data-mode="install"] header > span {
    color: var(--text);
}

.evidence-dialog h2 {
    max-width: none;
    margin: 0;
    font-family: var(--support);
    font-size: 0.96rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.35;
    text-transform: none;
}

.evidence-dialog button {
    min-height: 34px;
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--border-strong);
    color: var(--muted);
    background: transparent;
    font-family: var(--mono);
    font-size: 0.66rem;
    cursor: pointer;
}

.evidence-dialog button:hover,
.evidence-dialog button:focus-visible,
.evidence-dialog button[aria-pressed="true"] {
    border-color: var(--cyan);
    color: var(--text);
}

.evidence-viewport {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    place-items: center;
    padding: 1.2rem;
    background:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        #05070a;
    background-size: 48px 48px;
    cursor: grab;
    overscroll-behavior: contain;
}

.evidence-viewport.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.evidence-dialog.is-zoomed .evidence-viewport {
    display: block;
}

.evidence-dialog-image {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    margin: auto;
    line-height: 0;
}

.evidence-dialog-image > img {
    width: auto;
    height: auto;
    max-width: none;
    pointer-events: none;
    user-select: none;
}

.evidence-dialog.is-fit .evidence-dialog-image > img {
    width: auto;
    height: auto;
    max-width: calc(100vw - 3rem);
    max-height: calc(100dvh - 10rem);
}

.dialog-markers .evidence-marker {
    z-index: 2;
}

.evidence-dialog footer {
    border-top: 1px solid var(--border);
    grid-template-columns: 1fr auto 1fr;
}

.dialog-navigation,
.dialog-zoom {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.dialog-zoom {
    justify-content: center;
}

.dialog-zoom output {
    min-width: 3.4rem;
    color: var(--quiet);
    font-family: var(--mono);
    font-size: 0.64rem;
    text-align: center;
}

.evidence-dialog footer > a {
    justify-self: end;
    color: var(--cyan);
    font-family: var(--mono);
    font-size: 0.66rem;
    text-underline-offset: 0.3rem;
    text-transform: uppercase;
}

.plain-list {
    margin: 0 0 1.4rem;
    padding: 0;
    border-top: 1px solid var(--border);
    list-style: none;
}

.plain-list li {
    position: relative;
    padding: 1rem 0 1rem 1.4rem;
    border-bottom: 1px solid var(--border);
}

.plain-list li::before {
    position: absolute;
    top: 1.45rem;
    left: 0;
    width: 0.45rem;
    height: 0.45rem;
    content: "";
    border: 1px solid var(--cyan);
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    background: rgba(10, 13, 19, 0.82);
    font-size: 0.83rem;
}

th,
td {
    padding: 0.85rem 0.9rem;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--text);
    background: var(--surface-soft);
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

th:nth-child(1) {
    width: 35%;
}

th:nth-child(2) {
    width: 21%;
}

tr:last-child td {
    border-bottom: 0;
}

th:last-child,
td:last-child {
    border-right: 0;
}

td:nth-child(2) {
    color: var(--text);
    font-weight: 650;
}

code {
    font-family: var(--mono);
}

.mode-note {
    padding: 1rem 1.1rem;
    border-left: 2px solid var(--cyan);
    color: var(--muted);
    background: rgba(71, 200, 255, 0.055);
    font-size: 0.9rem;
}

.mode-note strong {
    color: var(--text);
}

.install-section {
    display: grid;
    align-items: end;
    gap: 3rem;
    padding: clamp(5rem, 9vw, 7rem) 0;
    border-bottom: 1px solid var(--border);
    grid-template-columns: minmax(0, 1fr) auto;
}

.install-section h2 {
    margin-bottom: 0.8rem;
}

.install-section p:not(.section-label) {
    max-width: 680px;
    margin-bottom: 0;
}

.install-section .actions {
    justify-content: flex-end;
    margin-top: 0;
}

.hooks-note {
    max-width: 680px;
    margin-top: 1.35rem;
    padding: 1rem 1.1rem;
    border-left: 2px solid var(--magenta);
    background: rgba(244, 91, 209, 0.055);
}

.hooks-note p {
    margin: 0;
}

.hooks-note .hooks-note-label {
    margin-bottom: 0.45rem;
    color: var(--magenta);
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-transform: uppercase;
}

.hooks-note code {
    color: var(--text);
}

.guard-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 64px;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border);
}

.guard-status .section-label {
    margin: 0;
    color: var(--quiet);
}

.guard-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding-left: 1rem;
    border-left: 1px solid var(--border);
}

.guard-badge img {
    display: block;
    height: 20px;
    width: auto;
    opacity: 0.9;
    transition: opacity 160ms ease, filter 160ms ease;
}

.guard-badge:hover img,
.guard-badge:focus-visible img {
    opacity: 1;
    filter: brightness(1.12);
}

.site-footer {
    display: grid;
    gap: 1rem;
    padding: 1.8rem 0 2.6rem;
    grid-template-columns: 1fr auto;
    color: var(--quiet);
    font-size: 0.78rem;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: var(--muted);
}

/* Support, privacy, and terms */
.legal-page .shell {
    max-width: 940px;
}

.legal-main {
    display: grid;
    gap: clamp(2.5rem, 7vw, 5rem);
    padding: clamp(4.5rem, 9vw, 7rem) 0;
    grid-template-columns: minmax(210px, 0.55fr) minmax(0, 1fr);
}

.legal-title {
    position: sticky;
    top: 2rem;
    align-self: start;
}

.legal-title h1 {
    max-width: 8ch;
    margin-bottom: 1rem;
    font-size: clamp(3rem, 7vw, 5.3rem);
}

.updated {
    color: var(--quiet);
}

.legal-copy {
    border-top: 1px solid var(--border-strong);
}

.legal-copy section {
    padding: 1.6rem 0;
    border-bottom: 1px solid var(--border);
}

.legal-copy h2 {
    max-width: none;
    margin-bottom: 0.7rem;
    font-size: clamp(1.35rem, 2.4vw, 1.8rem);
    letter-spacing: -0.025em;
}

.legal-copy p,
.legal-copy ul {
    margin: 0;
}

.legal-copy p + p,
.legal-copy ul {
    margin-top: 0.75rem;
}

.legal-copy a {
    color: var(--cyan);
    text-decoration-color: rgba(71, 200, 255, 0.45);
}

@media (max-width: 780px) {
    .hero {
        gap: 2.5rem;
        grid-template-columns: minmax(0, 1fr) 150px;
    }

    .project-facts {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-facts div:nth-child(2) {
        border-right: 0;
    }

    .project-facts div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--border);
    }

    .project-facts div:nth-child(3) {
        padding-left: 0;
    }

    .project-section,
    .legal-main,
    .install-section {
        grid-template-columns: 1fr;
    }

    .evidence-desk {
        grid-template-columns: 1fr;
    }

    .evidence-canvas {
        border-right: 0;
    }

    .evidence-stage figcaption {
        border-right: 0;
    }

    .annotation-rail {
        min-height: 270px;
        border-top: 1px solid var(--border-strong);
    }

    .evidence-index {
        grid-template-columns: repeat(3, 1fr);
    }

    .evidence-tab:nth-child(3) {
        border-right: 0;
    }

    .evidence-tab:nth-child(-n + 3) {
        border-bottom-color: var(--border);
    }

    .evidence-tab[aria-selected="true"] {
        border-bottom-color: var(--cyan);
    }

    .legal-title {
        position: static;
    }

    .install-section .actions {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .shell {
        width: min(calc(100% - 2rem), var(--page));
    }

    .site-header {
        min-height: 70px;
    }

    .brand {
        position: relative;
        width: 22px;
        height: 12px;
        overflow: hidden;
        color: transparent;
        white-space: nowrap;
    }

    .brand::before {
        position: absolute;
        top: 5px;
        left: 0;
    }

    .site-header nav {
        gap: 0.9rem;
        font-size: 0.72rem;
    }

    /* Only the index nav collapses its self-link and GitHub link; legal
       pages keep every navigation link. */
    .site-header nav.index-nav a:first-child,
    .site-header nav.index-nav a:last-child {
        display: none;
    }

    /* The legal-page product mark duplicates the nav's CPJ link; hide it
       so all four legal nav links fit on narrow screens. */
    .site-header .product-mark {
        display: none;
    }

    .hero {
        padding: 4rem 0;
        grid-template-columns: 1fr;
    }

    .hero-icon {
        width: 118px;
        grid-row: 1;
    }

    h1 {
        font-size: clamp(3.1rem, 15vw, 4.5rem);
    }

    .project-facts div {
        padding: 1rem;
    }

    .project-facts dd {
        font-size: 0.82rem;
    }

    .project-section {
        padding: 4.5rem 0;
    }

    .evidence-canvas {
        height: 440px;
        padding: 0.55rem;
    }

    .evidence-lens {
        display: none !important;
        width: 210px;
        height: 150px;
    }

    .evidence-magnify span:first-child {
        display: none;
    }

    .evidence-stage figcaption {
        min-height: 0;
        grid-template-columns: 1fr;
    }

    .evidence-index {
        grid-template-columns: repeat(2, 1fr);
    }

    .evidence-tab,
    .evidence-tab:nth-child(3) {
        border-right: 1px solid var(--border);
        border-bottom-color: var(--border);
    }

    .evidence-tab:nth-child(even) {
        border-right: 0;
    }

    .evidence-tab[aria-selected="true"] {
        border-bottom-color: var(--cyan);
    }

    .evidence-dialog header {
        gap: 0.65rem;
        padding: 0.65rem 0.75rem;
    }

    .evidence-dialog h2 {
        font-size: 0.78rem;
    }

    .evidence-dialog header > span {
        display: none;
    }

    .evidence-dialog footer {
        gap: 0.55rem;
        padding: 0.65rem 0.75rem;
        grid-template-columns: 1fr auto;
    }

    .dialog-navigation {
        grid-column: 1;
    }

    .dialog-zoom {
        grid-column: 2;
    }

    .evidence-dialog footer > a {
        grid-column: 1 / -1;
    }

    .evidence-viewport {
        padding: 0.65rem;
    }

    .site-footer {
        grid-template-columns: 1fr;
    }
}

@media (hover: none) {
    .evidence-lens {
        display: none !important;
    }

    .evidence-magnify span:first-child {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
