:root {
    --canvas: #ffffff;
    --ink: #121412;
    --grey: #5f655f;
    --soft: #7a807a;
    --line: #dfe3de;
    --fill: #f2f4f1;
    --accent: #ff9b92;
    --accent-soft: #fff0ee;
    --focus: #2069df;
    --max-width: 1180px;
    --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 104px;
}

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

button,
summary {
    font: inherit;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--focus) 55%, transparent);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 20;
    padding: 10px 14px;
    background: var(--ink);
    color: white;
    transform: translateY(-160%);
    transition: transform 180ms ease-out;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    min-height: 72px;
    padding: 0 28px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, white 94%, transparent);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    gap: 18px;
}

.logo-link {
    flex: 0 0 auto;
    line-height: 0;
}

.brand-logo {
    display: block;
    width: auto;
    height: 38px;
}

.header-context {
    padding-left: 18px;
    border-left: 1px solid var(--line);
    color: var(--grey);
    font-size: 14px;
    font-weight: 600;
}

main {
    width: min(100%, 1440px);
    margin: 0 auto;
}

.intro {
    width: min(calc(100% - 48px), var(--max-width));
    min-height: 560px;
    margin: 0 auto;
    padding: 88px 0 80px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.86fr);
    align-items: center;
    gap: 72px;
}

.status {
    margin: 0 0 18px;
    color: var(--grey);
    font-size: 14px;
    font-weight: 650;
}

.status span {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 8px;
    background: var(--accent);
    transform: rotate(45deg);
}

h1,
h2,
h3,
p {
    text-wrap: pretty;
}

h1 {
    max-width: 700px;
    margin: 0;
    font-size: 64px;
    font-weight: 780;
    letter-spacing: -0.035em;
    line-height: 0.98;
    text-wrap: balance;
}

.lede {
    max-width: 660px;
    margin: 28px 0 0;
    color: var(--grey);
    font-size: 21px;
    line-height: 1.55;
}

.setup-time {
    margin-top: 36px;
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.setup-time strong {
    font-size: 15px;
}

.setup-time span {
    color: var(--grey);
    font-size: 14px;
}

.system-map {
    min-height: 330px;
    padding: 36px 34px;
    background: var(--fill);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.system-node {
    min-height: 72px;
    display: grid;
    grid-template-columns: 92px 1fr;
    grid-template-rows: auto auto;
    column-gap: 20px;
    align-content: center;
}

.system-node strong {
    grid-column: 2;
    font-size: 22px;
    line-height: 1.2;
}

.system-node > span:last-child {
    grid-column: 2;
    color: var(--grey);
    font-size: 14px;
}

.system-role {
    grid-row: 1 / 3;
    align-self: center;
    color: var(--soft);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.system-node--boulie strong::after {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: 10px;
    background: var(--accent);
    transform: rotate(45deg);
}

.system-connector {
    width: 1px;
    height: 28px;
    margin-left: 91px;
    background: var(--ink);
}

.prerequisites {
    padding: 72px max(24px, calc((100% - var(--max-width)) / 2));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: minmax(240px, 0.74fr) minmax(0, 1.26fr);
    gap: 72px;
}

.prerequisites h2,
.rhythm h2,
.troubleshooting h2,
.advanced h2 {
    margin: 0 0 12px;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.prerequisites p,
.rhythm > div p,
.trouble-intro p,
.advanced > div p {
    max-width: 46ch;
    margin: 0;
    color: var(--grey);
}

.checklist {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
}

.checklist li {
    min-height: 76px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 18px;
}

.checklist li:last-child {
    border-bottom: 0;
}

.check {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    position: relative;
}

.check::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 4px;
    top: 5px;
    left: 5px;
    border-left: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    transform: rotate(-45deg);
}

.optional-dot {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border: 2px solid var(--line);
    border-radius: 50%;
    position: relative;
}

.optional-dot::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    top: 6px;
    left: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.checklist strong,
.checklist span:last-child {
    display: block;
}

.checklist span:last-child {
    color: var(--grey);
    font-size: 14px;
}

.checklist strong {
    color: var(--ink);
    font-size: 16px;
}

.guide-layout {
    width: min(calc(100% - 48px), var(--max-width));
    margin: 0 auto;
    padding: 104px 0 120px;
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 82px;
}

.step-nav {
    position: sticky;
    top: 108px;
    align-self: start;
}

.step-nav > p {
    margin: 0 0 18px;
    color: var(--soft);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.step-nav ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.step-nav li {
    margin-bottom: 5px;
}

.step-nav a {
    min-height: 44px;
    padding: 8px 6px;
    color: var(--grey);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-nav a:hover,
.step-nav a[aria-current="step"] {
    color: var(--ink);
}

.step-nav a[aria-current="step"] span {
    border-color: var(--ink);
    background: var(--ink);
    color: white;
}

.step-nav span {
    width: 26px;
    height: 26px;
    border: 1px solid var(--line);
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-size: 12px;
}

.step-nav .support-link {
    margin-top: 22px;
    border-top: 1px solid var(--line);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.guide {
    min-width: 0;
}

.step {
    padding: 0 0 104px;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 26px;
}

.step:last-of-type {
    padding-bottom: 88px;
}

.step-number {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--ink);
    color: white;
    font-size: 18px;
    font-weight: 750;
    display: grid;
    place-items: center;
}

.step-content {
    min-width: 0;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.step h2 {
    max-width: 760px;
    margin: 4px 0 12px;
    font-size: 38px;
    line-height: 1.12;
    letter-spacing: -0.025em;
}

.optional-label {
    display: inline-block;
    margin-left: 8px;
    padding: 4px 8px;
    background: var(--fill);
    color: var(--grey);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    vertical-align: middle;
}

.step-summary {
    max-width: 66ch;
    margin: 0 0 42px;
    color: var(--grey);
    font-size: 18px;
}

.instructions {
    margin: 0;
    padding: 0;
    counter-reset: instruction;
    list-style: none;
}

.instructions > li {
    min-height: 88px;
    padding: 24px 0;
    border-top: 1px solid var(--line);
    counter-increment: instruction;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 18px;
}

.instructions > li::before {
    content: counter(instruction);
    width: 28px;
    height: 28px;
    border: 1px solid var(--line);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--grey);
    font-size: 12px;
    font-weight: 700;
}

.instructions strong {
    font-size: 16px;
}

.instructions p {
    max-width: 68ch;
    margin: 5px 0 0;
    color: var(--grey);
}

.instructions ul {
    margin: 14px 0 0;
    padding-left: 19px;
}

.instructions ul li {
    margin: 7px 0;
    padding-left: 4px;
    color: var(--grey);
}

.instructions ul li::marker {
    color: var(--accent);
}

.copy-row {
    max-width: 620px;
    min-height: 54px;
    margin-top: 16px;
    border: 1px solid var(--ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.copy-row code {
    min-width: 0;
    padding: 14px 18px;
    color: var(--ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.copy-button {
    min-width: 98px;
    min-height: 44px;
    margin: 4px;
    padding: 10px 14px;
    border: 0;
    background: var(--ink);
    color: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: background-color 180ms ease-out, color 180ms ease-out;
}

.copy-button:hover {
    background: #303330;
}

.copy-button[data-copied="true"] {
    background: var(--accent);
    color: var(--ink);
}

.permission-note,
.finish-note {
    margin-top: 28px;
    padding: 24px 26px;
    background: var(--accent-soft);
}

.permission-note p,
.finish-note p {
    max-width: 68ch;
    margin: 6px 0 0;
    color: #5f3935;
}

.permission-note code {
    color: var(--ink);
    font-size: 0.9em;
}

.prompt-switcher {
    margin-top: 18px;
}

.prompt-tabs {
    min-height: 52px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: flex-end;
    gap: 28px;
}

.prompt-tabs button {
    min-height: 48px;
    padding: 10px 2px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: var(--grey);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

.prompt-tabs button:hover {
    color: var(--ink);
}

.prompt-tabs button[aria-selected="true"] {
    border-bottom-color: var(--ink);
    color: var(--ink);
}

.prompt-block {
    margin: 0;
    background: var(--ink);
    color: white;
}

.prompt-block[hidden] {
    display: none;
}

.prompt-toolbar {
    min-height: 58px;
    padding: 8px 8px 8px 24px;
    border-bottom: 1px solid #333733;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.prompt-toolbar span {
    color: #b9beb9;
    font-size: 13px;
    font-weight: 650;
}

.copy-button--dark {
    background: white;
    color: var(--ink);
}

.copy-button--dark:hover {
    background: var(--accent);
}

.prompt-block blockquote {
    max-width: 72ch;
    margin: 0;
    padding: 28px 28px 34px;
    color: #f6f7f6;
    font-size: 15px;
    line-height: 1.72;
    white-space: pre-line;
}

.advanced {
    padding: 48px 0 0 78px;
}

.advanced details {
    margin-top: 24px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.advanced summary,
.trouble-list summary {
    min-height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    font-weight: 700;
    list-style: none;
}

.advanced summary::-webkit-details-marker,
.trouble-list summary::-webkit-details-marker {
    display: none;
}

.advanced summary::after,
.trouble-list summary::after {
    content: "+";
    flex: 0 0 auto;
    font-size: 23px;
    font-weight: 400;
}

.advanced details[open] summary::after,
.trouble-list details[open] summary::after {
    content: "-";
}

.details-body {
    padding-bottom: 24px;
}

.details-body .copy-button {
    margin: 0 0 14px;
}

.details-body pre {
    max-height: 520px;
    margin: 0;
    padding: 22px;
    background: var(--fill);
    color: var(--ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    line-height: 1.65;
    overflow: auto;
    white-space: pre-wrap;
}

.rhythm {
    padding: 92px max(24px, calc((100% - var(--max-width)) / 2));
    background: var(--ink);
    color: white;
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
    gap: 72px;
}

.rhythm > div p {
    color: #b9beb9;
}

.rhythm ol {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rhythm li {
    min-height: 190px;
    padding: 2px 28px 0;
    border-left: 1px solid #383c38;
}

.rhythm li span {
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
}

.rhythm li strong {
    margin-top: 8px;
    display: block;
    font-size: 23px;
}

.rhythm li p {
    margin: 14px 0 0;
    color: #b9beb9;
    font-size: 14px;
}

.troubleshooting {
    width: min(calc(100% - 48px), var(--max-width));
    margin: 0 auto;
    padding: 104px 0 112px;
    display: grid;
    grid-template-columns: minmax(240px, 0.76fr) minmax(0, 1.24fr);
    gap: 72px;
}

.trouble-list {
    border-top: 1px solid var(--line);
}

.trouble-list details {
    border-bottom: 1px solid var(--line);
}

.trouble-list summary {
    min-height: 68px;
}

.trouble-list details p {
    max-width: 64ch;
    margin: 0;
    padding: 0 44px 22px 0;
    color: var(--grey);
}

.support {
    grid-column: 2;
    margin: -30px 0 0;
    color: var(--grey);
    font-size: 14px;
}

.support a {
    color: var(--ink);
    font-weight: 700;
    text-underline-offset: 4px;
}

.site-footer {
    min-height: 120px;
    padding: 34px max(24px, calc((100% - var(--max-width)) / 2));
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 32px;
    color: var(--grey);
    font-size: 13px;
}

.wordmark--small {
    color: var(--ink);
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

.site-footer div {
    display: flex;
    gap: 24px;
}

.site-footer div a {
    text-underline-offset: 4px;
}

.site-footer > span {
    justify-self: end;
}

.copy-status {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 12;
    min-width: 130px;
    padding: 12px 16px;
    background: var(--ink);
    color: white;
    font-size: 13px;
    font-weight: 650;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 180ms ease-out, transform 180ms ease-out;
}

.copy-status.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 960px) {
    .intro {
        min-height: 0;
        padding-top: 64px;
        grid-template-columns: 1fr;
        gap: 48px;
    }

    h1 {
        max-width: 780px;
        font-size: 56px;
    }

    .system-map {
        min-height: 260px;
    }

    .prerequisites,
    .rhythm,
    .troubleshooting {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .support {
        grid-column: 1;
        margin-top: -14px;
    }

    .guide-layout {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .step-nav {
        position: static;
        padding-bottom: 22px;
        border-bottom: 1px solid var(--line);
    }

    .step-nav > p,
    .step-nav .support-link {
        display: none;
    }

    .step-nav ol {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .step-nav li {
        margin: 0;
    }

    .step-nav a {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .rhythm ol {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    html {
        scroll-padding-top: 86px;
    }

    .site-header {
        min-height: 64px;
        padding: 0 18px;
    }

    .header-context {
        font-size: 13px;
    }

    .brand-logo {
        height: 34px;
    }

    .intro,
    .guide-layout,
    .troubleshooting {
        width: min(calc(100% - 36px), var(--max-width));
    }

    .intro {
        padding: 48px 0 58px;
        gap: 36px;
    }

    h1 {
        font-size: 42px;
        line-height: 1.02;
    }

    .lede {
        font-size: 18px;
    }

    .setup-time {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .system-map {
        min-height: 0;
        padding: 22px 20px;
    }

    .system-node {
        grid-template-columns: 74px 1fr;
    }

    .system-node strong {
        font-size: 19px;
    }

    .system-connector {
        margin-left: 73px;
    }

    .prerequisites {
        padding: 54px 18px;
    }

    .guide-layout {
        padding: 68px 0 80px;
    }

    .step-nav ol {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 4px;
    }

    .step {
        padding-bottom: 76px;
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 14px;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }

    .step h2 {
        margin-top: 2px;
        font-size: 29px;
    }

    .step-summary {
        margin-bottom: 32px;
        font-size: 16px;
    }

    .instructions > li {
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 10px;
    }

    .copy-row {
        align-items: stretch;
        flex-direction: column;
    }

    .copy-button {
        width: calc(100% - 8px);
    }

    .prompt-toolbar {
        align-items: stretch;
        flex-direction: column;
        padding: 16px;
    }

    .prompt-tabs {
        gap: 18px;
    }

    .prompt-toolbar .copy-button {
        width: 100%;
        margin: 0;
    }

    .prompt-block blockquote {
        padding: 24px 20px 30px;
    }

    .permission-note,
    .finish-note {
        padding: 20px;
    }

    .advanced {
        padding-left: 0;
    }

    .rhythm {
        padding: 68px 18px;
    }

    .rhythm ol {
        grid-template-columns: 1fr;
    }

    .rhythm li {
        min-height: 0;
        padding: 22px 0;
        border-left: 0;
        border-top: 1px solid #383c38;
    }

    .troubleshooting {
        padding: 72px 0 78px;
    }

    .site-footer {
        min-height: 0;
        padding: 36px 18px;
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .site-footer > span {
        justify-self: start;
    }
}

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

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