/* Stable anti-break layout stylesheet - Variant 3 */
:root {
    --bg: #091310;
    --header-bg: rgba(9, 19, 16, 0.95);
    --footer-bg: #060f0c;
    --panel: #10201b;
    --line: #20473b;
    --line-soft: rgba(127, 224, 187, 0.2);
    --input-line: #2e6656;
    --input-bg: #0b1914;
    --text: #e4f4ee;
    --text-nav: #d7eee6;
    --muted: #bcd8cf;
    --title: #c7f3e3;
    --title-main: #f3fffb;
    --accent: #7fe0bb;
    --accent-soft: #b9f5df;
    --btn-text: #062018;
    --btn-radius: 6px;
    --card-radius: 10px;
    --hero-radius: 10px;
    --hero-shadow: rgba(0, 0, 0, 0.38);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--hero-radius);
    box-shadow: 0 14px 30px var(--hero-shadow);
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-soft); }
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(8px);
}
header > div {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
header > div > div:first-child {
    color: var(--title);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}
header input[type="checkbox"] { display: none; }
header label {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}
header label span {
    width: 24px;
    height: 2px;
    background: var(--accent);
}
header nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}
header nav a {
    color: var(--text-nav);
    font-size: 0.92rem;
    font-weight: 600;
}
main > section, main > article, main > div {
    padding: 64px 20px;
}
main > section > div, main > article > div, main > div > div {
    max-width: 1200px;
    margin: 0 auto;
}
h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.14;
    color: var(--title-main);
    margin-bottom: 18px;
}
h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1.2;
    color: var(--title);
    margin-bottom: 18px;
}
h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--title-main);
}
p { margin-bottom: 12px; color: var(--muted); }
main section:first-of-type > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 32px;
    align-items: center;
}
main section:first-of-type > div > div { min-width: 0; }
main a[href^="#"] {
    display: inline-block;
    margin-top: 10px;
    padding: 12px 22px;
    border-radius: var(--btn-radius);
    font-weight: 700;
    background: var(--accent);
    color: var(--btn-text);
    border: 1px solid transparent;
}
main a[href^="#"]:hover {
    background: transparent;
    color: var(--accent-soft);
    border-color: var(--accent);
}
main ul { list-style: none; margin-top: 12px; }
main li {
    position: relative;
    padding: 10px 0 10px 18px;
    border-bottom: 1px solid var(--line-soft);
}
main li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
}
main section:nth-of-type(3) > div > div,
main section:nth-of-type(4) > div > div,
main section:nth-of-type(5) > div > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
main section:nth-of-type(3) > div > div > div,
main section:nth-of-type(4) > div > div > div,
main section:nth-of-type(5) > div > div > div {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--card-radius);
    padding: 20px;
}
blockquote {
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: var(--card-radius);
    padding: 24px;
}
details {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: var(--card-radius);
    background: var(--panel);
}
summary {
    cursor: pointer;
    padding: 14px;
    font-weight: 600;
    color: var(--title-main);
}
details p, details div { padding: 0 14px 14px; }
form {
    max-width: 760px;
    margin-top: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--card-radius);
    padding: 22px;
}
form > div { margin-bottom: 14px; }
label { display: block; margin-bottom: 8px; color: var(--text-nav); }
input, textarea, button { font: inherit; }
input[type="text"], input[type="email"], textarea {
    width: 100%;
    padding: 11px 12px;
    border-radius: 8px;
    border: 1px solid var(--input-line);
    background: var(--input-bg);
    color: var(--title-main);
}
input[type="checkbox"] { margin-right: 8px; }
button[type="submit"] {
    border: none;
    padding: 12px 20px;
    border-radius: var(--btn-radius);
    font-weight: 700;
    background: var(--accent);
    color: var(--btn-text);
    cursor: pointer;
}
footer {
    padding: 40px 20px;
    background: var(--footer-bg);
    border-top: 1px solid var(--line);
}
footer > div {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
footer p { margin-bottom: 10px; }
footer div {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
@media (max-width: 900px) {
    header label { display: flex; }
    header nav {
        position: fixed;
        top: 63px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 63px);
        background: var(--bg);
        border-top: 1px solid var(--line);
        transition: left 0.3s ease;
        padding: 20px;
    }
    header input[type="checkbox"]:checked ~ nav { left: 0; }
    header nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    main section:first-of-type > div { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    main > section, main > article, main > div { padding: 48px 16px; }
    form { padding: 16px; }
}
