/* Use the Services palette and grid on the generated guide pages. */
body:has(> main.wrap) {
    background-color: #020202;
    background-image:
        linear-gradient(rgb(255 255 255 / 1.5%) 1px, transparent 1px),
        linear-gradient(90deg, rgb(255 255 255 / 1.5%) 1px, transparent 1px);
    background-size: 60px 60px;
}

main.wrap {
    --guide-line: rgb(255 255 255 / 10%);
    --guide-glass: rgb(255 255 255 / 2%);
    --guide-muted: #b0b0b0;
    --guide-anchor-offset: 7.5rem;
    width: min(calc(100% - 3rem), 80rem);
    margin-inline: auto;
    padding-block: 8rem clamp(3.5rem, 7vw, 6rem);
    color: #e5e5e5;
    font-family: Manrope, "Helvetica Neue", Arial, sans-serif;
}

main.wrap * { box-sizing: border-box; }
main.wrap a { color: inherit; text-underline-offset: .22em; }
main.wrap a:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
main.wrap h1, main.wrap h2 { margin: 0; color: #fff; font-weight: 700; text-wrap: balance; }
main.wrap h1 {
    font-size: clamp(2.25rem, 4.7vw, 3.75rem);
    line-height: 1.05;
    letter-spacing: -.035em;
}
main.wrap h2 {
    font-size: clamp(1.5rem, 2.65vw, 2.25rem);
    line-height: 1.2;
    letter-spacing: -.025em;
}

main.wrap .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 5.5rem);
    padding-block: .25rem clamp(3rem, 6vw, 5.5rem);
}
main.wrap .crumb, main.wrap figcaption, main.wrap aside h2 {
    font-family: "JetBrains Mono", ui-monospace, monospace;
}
main.wrap .crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem .65rem;
    margin-bottom: 1.25rem;
    color: #a3a3a3;
    font-size: .7rem;
    letter-spacing: .065em;
    line-height: 1.65;
    text-transform: uppercase;
}
main.wrap .crumb a:hover, main.wrap figcaption a:hover, main.wrap .source a:hover { color: #fff; }
main.wrap .intro {
    max-width: 62ch;
    margin: 1.25rem 0 0;
    color: var(--guide-muted);
    font-size: clamp(1rem, 1.55vw, 1.125rem);
    line-height: 1.65;
}
main.wrap .button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
    border-radius: .75rem;
    padding: .85rem 1.5rem;
    background: #fff;
    color: #0a0a0a;
    font-size: .75rem;
    line-height: 1.45;
    letter-spacing: .065em;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
}
main.wrap .button:hover { background: #e5e5e5; }
main.wrap .hero figure { margin: 0; min-width: 0; }
main.wrap .photo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border: 1px solid var(--guide-line);
    border-radius: 1rem;
    background: #141414;
}
main.wrap figcaption {
    margin-top: .6rem;
    color: #a3a3a3;
    font-size: .6875rem;
    line-height: 1.6;
}
main.wrap figcaption a, main.wrap .source a { text-decoration: underline; }

main.wrap .jump {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    border-block: 1px solid var(--guide-line);
    padding-block: 1.25rem;
}
main.wrap .jump a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    border: 1px solid var(--guide-line);
    border-radius: 999px;
    padding: .55rem 1rem;
    background: var(--guide-glass);
    color: #d4d4d4;
    font-size: .8125rem;
    line-height: 1.4;
    font-weight: 600;
    text-decoration: none;
}
main.wrap .category {
    margin-block-start: clamp(2.5rem, 5vw, 4.5rem);
    scroll-margin-top: var(--guide-anchor-offset);
}
main.wrap .tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr));
    gap: .875rem;
    padding: 0;
    margin: 1.25rem 0 0;
    list-style: none;
}
main.wrap .tiles a {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    min-height: 4.75rem;
    border: 1px solid var(--guide-line);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    background: var(--guide-glass);
    color: #e5e5e5;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
}
main.wrap .tiles a::after {
    content: "";
    flex: 0 0 .45rem;
    height: .45rem;
    border-block-start: 1px solid currentColor;
    border-inline-end: 1px solid currentColor;
    transform: rotate(45deg);
    color: #a3a3a3;
}
main.wrap .tiles a:hover, main.wrap .jump a:hover {
    border-color: rgb(255 255 255 / 26%);
    background: rgb(255 255 255 / 5%);
    color: #fff;
}

main.wrap .layout {
    display: grid;
    grid-template-columns: minmax(13.5rem, .67fr) minmax(0, 1.8fr);
    gap: clamp(2rem, 5vw, 5.25rem);
    align-items: start;
}
main.wrap aside, main.wrap .body .action {
    border: 1px solid var(--guide-line);
    border-radius: 1rem;
    background: var(--guide-glass);
}
main.wrap aside { padding: clamp(1rem, 2.3vw, 1.65rem); }
main.wrap aside h2 {
    color: var(--guide-muted);
    font-size: .75rem;
    line-height: 1.6;
    letter-spacing: .085em;
    text-transform: uppercase;
    text-wrap: initial;
}
main.wrap aside ul { margin: .7rem 0 0; padding: 0; list-style: none; }
main.wrap aside li + li { border-block-start: 1px solid var(--guide-line); }
main.wrap aside a, main.wrap .related a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding-block: .65rem;
    color: #d4d4d4;
    font-size: .94rem;
    line-height: 1.5;
    text-decoration: none;
}
main.wrap aside a:hover, main.wrap .related a:hover { color: #fff; text-decoration: underline; }
main.wrap .body { min-width: 0; }
main.wrap .body section, main.wrap .related {
    border-block-start: 1px solid var(--guide-line);
    padding-block: clamp(1.75rem, 3.4vw, 2.75rem);
    scroll-margin-top: var(--guide-anchor-offset);
}
main.wrap .body p {
    max-width: 70ch;
    margin: .85rem 0 0;
    color: #c6c6c6;
    font-size: 1.0625rem;
    line-height: 1.75;
}
main.wrap .body .source { margin-top: .8rem; color: var(--guide-muted); font-size: .875rem; }
main.wrap .body .action { margin-block: .65rem 2rem; padding: clamp(1.35rem, 3vw, 2.25rem); }
main.wrap .action .button { margin-top: 1rem; }
main.wrap .related { padding-bottom: 0; }
main.wrap .related h2 { margin-bottom: .75rem; }
main.wrap .related a { width: fit-content; }

main.wrap:lang(ar) { font-family: Manrope, Tahoma, Arial, sans-serif; }
main.wrap:lang(ar) :is(h1,h2,.crumb,figcaption,.button) { letter-spacing: normal; text-transform: none; }
main.wrap:lang(ar) h1 { line-height: 1.4; }
main.wrap:lang(ar) h2 { line-height: 1.5; }
main.wrap:lang(ar) :is(.crumb,figcaption,aside h2) { font-family: Manrope, Tahoma, Arial, sans-serif; }
main.wrap:lang(ar) .tiles a::after { transform: rotate(-45deg); }

@media (min-width: 64rem) and (min-height: 44rem) {
    main.wrap aside { position: sticky; top: var(--guide-anchor-offset); }
}
@media (max-width: 48rem) {
    main.wrap { width: min(calc(100% - 2.5rem), 80rem); padding-block-start: 7.75rem; }
    main.wrap .hero, main.wrap .layout { grid-template-columns: minmax(0, 1fr); }
    main.wrap .hero { gap: 1.5rem; padding-block-end: 2.5rem; }
    main.wrap .crumb { margin-bottom: .85rem; }
    main.wrap .photo { aspect-ratio: 16 / 8; max-height: 21rem; }
    main.wrap .layout { gap: 1.5rem; }
}
@media (max-width: 32rem) {
    main.wrap .jump { gap: .45rem; }
    main.wrap .jump a { padding-inline: .8rem; }
    main.wrap .tiles { grid-template-columns: minmax(0, 1fr); }
    main.wrap .tiles a { min-height: 4rem; }
}
