/* ============================================================
   Arborea landing page — CSS3 baseline
   Estilo: DESIGN.md (monoespaciado, crema, hairlines, ASCII)
   ============================================================ */

/* ─── Tokens (valores literales repetidos; sin custom properties
       para no romper la línea base CSS3) ───────────────────────
   canvas            #fdfcfc
   surface-soft      #f8f7f7
   surface-card      #f1eeee
   surface-dark      #201d1d
   surface-dark-elev #302c2c
   ink               #201d1d
   ink-deep          #0f0000
   body              #424245
   mute              #646262
   ash               #9a9898
   hairline          rgba(15, 0, 0, 0.12)
   hairline-strong   #646262
   ──────────────────────────────────────────────────────────── */

/* ─── Reset ─── */
html {
    min-width: 320px;
    background: #fdfcfc;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

*,
*::before,
*::after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

body {
    margin: 0;
    color: #201d1d;
    background: #fdfcfc;
    font-family: "Berkeley Mono", "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
        Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
pre {
    margin: 0;
}

ul,
ol {
    padding: 0;
    list-style: none;
}

a {
    color: #201d1d;
}

strong {
    font-weight: 700;
    color: #201d1d;
}

html {
    scroll-behavior: smooth;
}

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

:focus {
    outline: 2px solid #201d1d;
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 100;
    padding: 4px 12px;
    color: #fdfcfc;
    background: #201d1d;
    border-radius: 4px;
    text-decoration: none;
    -webkit-transform: translateY(-200%);
    -ms-transform: translateY(-200%);
    transform: translateY(-200%);
}

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

/* ─── Container ─── */
.container {
    width: 100%;
    max-width: 1008px; /* 960px de contenido + 2 × 24px */
    margin-right: auto;
    margin-left: auto;
    padding-right: 24px;
    padding-left: 24px;
}

/* ─── ASCII wordmark ─── */
.wordmark {
    display: block;
    font-family: inherit;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;
    white-space: pre;
    overflow: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.wordmark--nav {
    font-size: 7px;
    color: #201d1d;
}

/* ─── Buttons ─── */
.btn {
    display: inline-block;
    padding: 4px 20px;
    border: 1px solid #201d1d;
    border-radius: 4px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.btn--primary {
    color: #fdfcfc;
    background: #201d1d;
}

.btn--primary:active {
    background: #0f0000;
    border-color: #0f0000;
}

.btn--block {
    display: block;
    width: 100%;
    padding-top: 8px;
    padding-bottom: 8px;
}

/* ============================================================
   Nav
   ============================================================ */
.nav {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fdfcfc;
    border-bottom: 1px solid rgba(15, 0, 0, 0.12);
}

.nav__inner {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    min-height: 56px;
}

.nav__brand {
    display: block;
    padding: 8px 0;
    text-decoration: none;
    -webkit-box-flex: 0;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
}

.nav__links {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    margin-left: auto;
}

.nav__links li {
    margin-left: 24px;
}

.nav__link {
    display: block;
    padding: 8px 0;
    font-weight: 500;
    text-decoration: none;
}

.nav__link:hover,
.nav__link:focus {
    text-decoration: underline;
}

/* ============================================================
   Sections
   ============================================================ */
.section {
    padding-top: 96px;
}

/* Compensa la nav sticky al saltar a un ancla */
@supports (scroll-margin-top: 1px) {
    .section {
        scroll-margin-top: 57px;
    }
}

.section__label {
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(15, 0, 0, 0.12);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
}

.section__intro {
    padding: 16px 0 0;
    color: #424245;
}

/* ─── Editions (download cards) ─── */
.editions {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-top: 24px;
    border-top: 1px solid rgba(15, 0, 0, 0.12);
    border-left: 1px solid rgba(15, 0, 0, 0.12);
}

.edition {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    width: 50%;
    padding: 24px;
    background: #fdfcfc;
    border-right: 1px solid rgba(15, 0, 0, 0.12);
    border-bottom: 1px solid rgba(15, 0, 0, 0.12);
    -webkit-box-flex: 1;
    -ms-flex: 1 1 50%;
    flex: 1 1 50%;
}

.edition__index {
    color: #646262;
    font-size: 14px;
    line-height: 2;
}

.edition__name {
    margin-top: 4px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.5;
}

.edition__desc {
    margin-top: 8px;
    color: #424245;
}

.edition__meta {
    margin: 16px 0 24px;
    border-top: 1px solid rgba(15, 0, 0, 0.12);
    -webkit-box-flex: 1;
    -ms-flex: 1 0 auto;
    flex: 1 0 auto;
}

.edition__row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(15, 0, 0, 0.12);
}

.edition__row dt {
    color: #646262;
}

.edition__row dt::before {
    content: "[-] ";
    color: #9a9898;
}

.edition__row dd {
    color: #201d1d;
    font-weight: 500;
    text-align: right;
}

/* ─── Install steps ─── */
.steps {
    margin-top: 8px;
}

.steps__row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    padding: 12px 0;
    color: #424245;
    border-bottom: 1px solid rgba(15, 0, 0, 0.12);
}

.steps__marker {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    margin-right: 16px;
    color: #201d1d;
    font-weight: 700;
}

/* ─── FAQ ─── */
.faq {
    margin-top: 8px;
}

.faq__row {
    border-bottom: 1px solid rgba(15, 0, 0, 0.12);
}

.faq__q {
    display: block;
    padding: 12px 0 12px 24px;
    color: #201d1d;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
}

.faq__q::-webkit-details-marker {
    display: none;
}

.faq__q::marker {
    content: "";
}

.faq__q::before {
    content: "+";
    display: inline-block;
    width: 24px;
    margin-left: -24px;
    color: #646262;
}

.faq__row[open] .faq__q::before {
    content: "\2212";
}

.faq__a {
    padding: 0 0 12px 24px;
    color: #424245;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
    margin-top: 96px;
    padding: 32px 0;
    color: #424245;
    border-top: 1px solid rgba(15, 0, 0, 0.12);
    font-size: 14px;
    line-height: 2;
}

.footer__bottom {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    color: #646262;
}

/* ============================================================
   Responsive
   ============================================================ */

/* tablet */
@media (max-width: 850px) {
    .section {
        padding-top: 64px;
    }

    .footer {
        margin-top: 64px;
    }
}

/* mobile */
@media (max-width: 640px) {
    .container {
        padding-right: 16px;
        padding-left: 16px;
    }

    .section {
        padding-top: 48px;
    }

    .footer {
        margin-top: 48px;
    }

    .wordmark--nav {
        font-size: 6px;
    }

    /* Los enlaces pasan a una segunda fila, alineados a la izquierda */
    .nav__links {
        width: 100%;
        margin-left: 0;
    }

    .nav__links li {
        margin: 0 16px 0 0;
    }

    .nav__link {
        font-size: 14px;
    }

    .edition {
        width: 100%;
        padding: 20px 16px;
        -ms-flex-preferred-size: 100%;
        flex-basis: 100%;
    }

    .edition__name {
        font-size: 20px;
    }

    .footer__bottom {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
    }
}
