/*
 * Site pages (base.html.twig): the look of the home page design on top of Bootstrap 5.3 - IBM Plex fonts
 * (vendored, the CSP allows no font CDN), a solder-mask green accent, light and dark (js/theme.js).
 * No inline styles anywhere: the CSP forbids them.
 *
 * U+02BC (the Ukrainian apostrophe) is left out of the Plex unicode-range: Plex draws it 0.6em wide,
 * which reads as "пам ʼ ять"; the system font after Plex in the stack draws it narrow.
 */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/vendor/fonts/ibm-plex/5.3.0/ibm-plex-sans-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/vendor/fonts/ibm-plex/5.3.0/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/vendor/fonts/ibm-plex/5.3.0/ibm-plex-sans-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/vendor/fonts/ibm-plex/5.3.0/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/vendor/fonts/ibm-plex/5.3.0/ibm-plex-sans-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/vendor/fonts/ibm-plex/5.3.0/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/vendor/fonts/ibm-plex/5.3.0/ibm-plex-sans-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/vendor/fonts/ibm-plex/5.3.0/ibm-plex-sans-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/vendor/fonts/ibm-plex/5.3.0/ibm-plex-mono-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/vendor/fonts/ibm-plex/5.3.0/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("/vendor/fonts/ibm-plex/5.3.0/ibm-plex-mono-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("/vendor/fonts/ibm-plex/5.3.0/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
    --site-ground: #F3F5F4;
    --site-surface: #FFFFFF;
    --site-ink: #111816;
    --site-muted: #3B4541;
    --site-faint: #55615C;
    --site-line: #DCE2DF;
    --site-line-strong: #B9C3BE;
    --site-accent: #0F6B4F;
    --site-accent-hover: #0A4D39;
    --site-on-accent: #FFFFFF;
    --site-on-accent-soft: #E3F4EC;
    --site-band: #111816;
    --site-band-ink: #E8EEEB;
    --site-band-accent: #6FD3AB;
    --site-band-muted: #9AA8A2;
    --site-badge-bg: #FCEFD8;
    --site-badge-ink: #7A4A06;
    --site-shadow: 0 24px 60px rgba(17, 24, 22, 0.16);

    --bs-body-font-family: "IBM Plex Sans", system-ui, sans-serif;
    --bs-font-monospace: "IBM Plex Mono", ui-monospace, monospace;
    --bs-body-bg: var(--site-ground);
    --bs-body-color: var(--site-ink);
    --bs-primary: #0F6B4F;
    --bs-primary-rgb: 15, 107, 79;
    --bs-link-color: #0F6B4F;
    --bs-link-color-rgb: 15, 107, 79;
    --bs-link-hover-color: #0A4D39;
    --bs-link-hover-color-rgb: 10, 77, 57;
    --bs-focus-ring-color: rgba(15, 107, 79, 0.25);
}

[data-bs-theme="dark"] {
    --site-ground: #0E1412;
    --site-surface: #151D1A;
    --site-ink: #E8EEEB;
    --site-muted: #B3C0BA;
    --site-faint: #9AA8A2;
    --site-line: #26312D;
    --site-line-strong: #3A4843;
    --site-accent: #6FD3AB;
    --site-accent-hover: #93E0C1;
    --site-on-accent: #0B1310;
    --site-on-accent-soft: #123A2C;
    --site-band: #0A0F0D;
    --site-badge-bg: #3D2A08;
    --site-badge-ink: #F6C77A;
    --site-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);

    --bs-body-bg: var(--site-ground);
    --bs-body-color: var(--site-ink);
    --bs-primary: #6FD3AB;
    --bs-primary-rgb: 111, 211, 171;
    --bs-link-color: #6FD3AB;
    --bs-link-color-rgb: 111, 211, 171;
    --bs-link-hover-color: #93E0C1;
    --bs-link-hover-color-rgb: 147, 224, 193;
    --bs-focus-ring-color: rgba(111, 211, 171, 0.3);
}

/* Bootstrap components of the site pages in the accent colour. */
.btn-primary {
    --bs-btn-color: var(--site-on-accent);
    --bs-btn-bg: var(--site-accent);
    --bs-btn-border-color: var(--site-accent);
    --bs-btn-hover-color: var(--site-on-accent);
    --bs-btn-hover-bg: var(--site-accent-hover);
    --bs-btn-hover-border-color: var(--site-accent-hover);
    --bs-btn-active-color: var(--site-on-accent);
    --bs-btn-active-bg: var(--site-accent-hover);
    --bs-btn-active-border-color: var(--site-accent-hover);
    --bs-btn-disabled-color: var(--site-on-accent);
    --bs-btn-disabled-bg: var(--site-accent);
    --bs-btn-disabled-border-color: var(--site-accent);
}

.pagination {
    --bs-pagination-active-bg: var(--site-accent);
    --bs-pagination-active-border-color: var(--site-accent);
    --bs-pagination-active-color: var(--site-on-accent);
}

.nav-pills {
    --bs-nav-pills-link-active-bg: var(--site-accent);
    --bs-nav-pills-link-active-color: var(--site-on-accent);
}

.form-check-input:checked {
    background-color: var(--site-accent);
    border-color: var(--site-accent);
}

.form-check-input:focus {
    border-color: var(--site-accent);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--site-accent);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

.mono-font {
    font-family: var(--bs-font-monospace);
}

/* Shared frame: header, footer, content width; the footer stays at the bottom of short pages. */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body > main {
    flex: 1 0 auto;
}

.site-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.site-header {
    background: var(--site-surface);
    border-bottom: 1px solid var(--site-line);
}

.site-header-row {
    min-height: 72px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--site-ink);
    text-decoration: none;
}

.site-brand:hover {
    color: var(--site-ink);
}

.site-brand-name {
    font-family: var(--bs-font-monospace);
    font-weight: 600;
    font-size: 20px;
    letter-spacing: 0.5px;
}

.site-brand svg {
    stroke: var(--site-accent);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
    flex-grow: 1;
    font-size: 15px;
}

.site-nav a,
.site-actions a.site-link {
    color: var(--site-ink);
    text-decoration: none;
}

.site-nav a:hover,
.site-actions a.site-link:hover {
    color: var(--site-accent);
}

.site-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    font-size: 15px;
}

.site-actions form {
    margin: 0;
}

.site-who {
    color: var(--site-faint);
    font-size: 14px;
}

.lang-switch {
    display: flex;
    border: 1px solid var(--site-line-strong);
    border-radius: 6px;
    font-family: var(--bs-font-monospace);
    font-size: 13px;
}

/* No overflow: hidden on the group: it would clip the focus ring of the link. */
.lang-switch > * {
    padding: 6px 10px;
    color: var(--site-ink);
    text-decoration: none;
}

.lang-switch > :first-child {
    border-radius: 5px 0 0 5px;
}

.lang-switch > :last-child {
    border-radius: 0 5px 5px 0;
}

.lang-switch > a:focus-visible {
    outline: 2px solid var(--site-accent);
    outline-offset: 2px;
}

.lang-switch > [aria-current] {
    background: var(--site-ink);
    color: var(--site-surface);
}

.site-button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 6px;
    background: var(--site-accent);
    color: var(--site-on-accent);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--site-accent);
}

.site-button:hover {
    background: var(--site-accent-hover);
    border-color: var(--site-accent-hover);
    color: var(--site-on-accent);
}

.site-button-ghost {
    background: transparent;
    color: var(--site-ink);
    border-color: var(--site-line-strong);
}

.site-button-ghost:hover {
    background: var(--site-surface);
    color: var(--site-ink);
    border-color: var(--site-ink);
}

.site-button-small {
    min-height: 40px;
    padding: 0 14px;
    font-weight: 500;
}

.site-footer {
    padding: 32px 0;
    background: var(--site-band);
    color: var(--site-band-muted);
    font-size: 14px;
}

.site-footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
}

.site-footer-row .site-brand-name {
    font-size: 16px;
    color: var(--site-band-ink);
}

.site-footer-row .grow {
    flex-grow: 1;
}

.site-footer a {
    color: #C9D5D0;
}

/* Home page sections (templates/site/home.html.twig). */
.home-hero {
    padding: 72px 0 80px;
}

.home-split {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 56px;
}

.home-split > .text {
    flex: 1 1 420px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.home-split > .shot {
    flex: 1 1 520px;
    min-width: 0;
}

.home-eyebrow {
    font-family: var(--bs-font-monospace);
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--site-accent);
}

.home-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.home-lead {
    margin: 0;
    font-size: 19px;
    line-height: 1.55;
    color: var(--site-muted);
}

.home-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.home-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    font-size: 14px;
    color: var(--site-faint);
}

.home-stats b {
    font-family: var(--bs-font-monospace);
    color: var(--site-ink);
}

.home-shot {
    margin: 0;
    border: 1px solid var(--site-line-strong);
    border-radius: 10px;
    overflow: hidden;
    background: var(--site-surface);
    box-shadow: var(--site-shadow);
}

.home-shot img {
    display: block;
    width: 100%;
    height: auto;
}

.home-section {
    padding: 72px 0;
}

.home-section-white {
    background: var(--site-surface);
    border-top: 1px solid var(--site-line);
    border-bottom: 1px solid var(--site-line);
}

.home-section h2 {
    margin: 0;
    font-size: 34px;
    font-weight: 700;
}

.home-stack {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.home-intro {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 720px;
}

.home-intro p {
    margin: 0;
    font-size: 18px;
    line-height: 1.55;
    color: var(--site-muted);
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.home-step {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px;
    border: 1px solid var(--site-line);
    border-radius: 10px;
    background: var(--site-ground);
}

.home-step-number {
    font-family: var(--bs-font-monospace);
    font-size: 15px;
    font-weight: 600;
    color: var(--site-accent);
}

.home-step h3,
.home-point h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.home-step p,
.home-point p {
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
    color: var(--site-muted);
}

.home-point {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 18px;
    border-top: 3px solid var(--site-accent);
}

.home-band {
    padding: 80px 0;
    background: var(--site-band);
    color: var(--site-band-ink);
}

.home-band .home-eyebrow {
    color: var(--site-band-accent);
}

.home-band h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.15;
    font-weight: 700;
    color: #FFFFFF;
}

.home-features {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 17px;
    line-height: 1.5;
}

.home-features li {
    display: flex;
    gap: 12px;
}

.home-features li::before {
    content: ">";
    font-family: var(--bs-font-monospace);
    color: var(--site-band-accent);
}

.home-band .home-shot {
    border-color: #2E3935;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.home-band .site-button {
    background: var(--site-band-accent);
    border-color: var(--site-band-accent);
    color: #0B1310;
}

.home-band .site-button:hover {
    background: #93E0C1;
    border-color: #93E0C1;
}

.home-cta-wrap {
    padding: 0 0 72px;
}

.home-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 28px;
    padding: 40px;
    border-radius: 12px;
    background: var(--site-accent);
    color: var(--site-on-accent);
}

.home-cta > .text {
    flex: 1 1 460px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-cta h2 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
}

.home-cta p {
    margin: 0;
    font-size: 17px;
    line-height: 1.55;
    color: var(--site-on-accent-soft);
}

[data-bs-theme="dark"] .home-cta p {
    color: #123A2C;
}

.home-cta .site-button {
    background: var(--site-surface);
    border-color: var(--site-surface);
    color: var(--site-ink);
}

[data-bs-theme="dark"] .home-cta .site-button {
    background: #0B1310;
    border-color: #0B1310;
    color: #E8EEEB;
}

.home-programmer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 48px;
}

.home-programmer > .text {
    flex: 1 1 420px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.home-programmer > .picture {
    flex: 1 1 420px;
    display: flex;
    justify-content: center;
}

.home-programmer svg {
    width: 100%;
    max-width: 420px;
    height: auto;
    stroke: var(--site-ink);
}

.home-programmer svg .accent {
    stroke: var(--site-accent);
}

.home-programmer svg text {
    fill: var(--site-accent);
    stroke: none;
    font-family: var(--bs-font-monospace);
}

.home-programmer .title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.home-programmer h2 {
    font-size: 30px;
}

.home-programmer p {
    margin: 0;
    font-size: 17px;
    line-height: 1.55;
    color: var(--site-muted);
}

.home-badge {
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--site-badge-bg);
    color: var(--site-badge-ink);
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 575px) {
    .site-wrap {
        padding: 0 16px;
    }

    .home-hero {
        padding: 40px 0 48px;
    }

    .home-section,
    .home-band {
        padding: 48px 0;
    }

    .home-cta {
        padding: 28px 20px;
    }
}

/* The download page (/download): a card per platform, the hash breaks anywhere on a phone. */
.download-version {
    margin: 0;
    font-size: 18px;
    color: var(--site-muted);
}

.download-version .version {
    color: var(--site-ink);
}

.download-file h2,
.download-notes h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.download-file .download-sha {
    font-size: 14px;
}

.download-file .download-sha code {
    color: inherit;
    word-break: break-all;
}

.download-notes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 720px;
}

.download-notes p,
.download-signed,
.download-empty {
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
    color: var(--site-muted);
}

/* The FAQ page (/faq): groups of questions, each a <details> row (no JS). */
.faq-group {
    display: flex;
    flex-direction: column;
    max-width: 820px;
}

.faq-group h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.faq-item {
    border-top: 1px solid var(--site-line);
}

.faq-item:last-child {
    border-bottom: 1px solid var(--site-line);
}

.faq-item > summary {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    align-items: baseline;
    padding: 16px 0;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.faq-item > summary::-webkit-details-marker {
    display: none;
}

.faq-item > summary::after {
    content: '+';
    flex-shrink: 0;
    font-family: var(--bs-font-monospace);
    font-size: 22px;
    line-height: 1;
    color: var(--site-accent);
    transition: transform 0.15s;
}

.faq-item[open] > summary::after {
    transform: rotate(45deg);
}

.faq-item > summary:hover {
    color: var(--site-accent);
}

.faq-item > summary:focus-visible {
    outline: 2px solid var(--site-accent);
    outline-offset: 2px;
}

.faq-answer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 720px;
    padding-bottom: 20px;
}

.faq-answer p {
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
    color: var(--site-muted);
}

@media (prefers-reduced-motion: reduce) {
    .faq-item > summary::after {
        transition: none;
    }
}
