:root {
    --bg: #f6f8f3;
    --surface: #ffffff;
    --surface-soft: #edf5e9;
    --green: #2f6b3f;
    --green-dark: #214d2f;
    --accent: #f2c94c;
    --text: #243127;
    --muted: #6f7a70;
    --line: #dfe7dd;
    --shadow: 0 16px 36px rgba(36, 49, 39, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    width: 280px;
    height: 100vh;
    background: var(--green-dark);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 24px 18px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 34px;
    padding: 0 8px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: var(--green-dark);
    font-size: 21px;
}

.brand-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
}

.brand-subtitle {
    margin: 2px 0 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 13px;
}

.menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu li {
    margin-bottom: 8px;
}

.menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 11px 12px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.menu a:hover,
.menu a.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    transform: translateX(3px);
}

.menu i {
    width: 20px;
    text-align: center;
}

.sidebar-note {
    margin-top: auto;
    padding: 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.content {
    flex: 1;
    width: calc(100% - 280px);
    padding: 34px;
}

.page {
    max-width: 1180px;
    margin: 0 auto;
}

.hero {
    min-height: 360px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 34px;
    align-items: center;
    padding: 42px;
    border-radius: 8px;
    background:
        linear-gradient(110deg, rgba(33, 77, 47, 0.94), rgba(47, 107, 63, 0.76)),
        url("https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1400&q=80");
    background-size: cover;
    background-position: center;
    color: #fff;
    box-shadow: var(--shadow);
}

.hero h1 {
    margin: 0 0 16px;
    font-size: 46px;
    line-height: 1.05;
    font-weight: 800;
}

.hero p {
    max-width: 610px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-panel {
    padding: 24px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(10px);
}

.hero-stat {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-stat:last-child {
    border-bottom: 0;
}

.hero-stat strong {
    font-size: 24px;
}

.btn-main,
.btn-ghost,
.btn-soft {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    border: 0;
    cursor: pointer;
}

.btn-main {
    background: var(--accent);
    color: #243127;
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
}

.btn-soft {
    background: var(--surface-soft);
    color: var(--green-dark);
}

.btn-main:disabled,
.btn-soft:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.section {
    margin-top: 34px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.section h2,
.page-title {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
}

.section p,
.page-lead {
    color: var(--muted);
    line-height: 1.6;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.card-item {
    min-height: 180px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(36, 49, 39, 0.05);
}

.card-item h3 {
    margin: 0 0 10px;
    font-size: 21px;
    font-weight: 800;
}

.card-title-link {
    color: inherit;
    text-decoration: none;
}

.card-title-link:hover {
    color: var(--green);
}

.card-item p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.55;
}

.route-path {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr) 58px minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(242, 201, 76, 0.14), transparent 36%),
        linear-gradient(315deg, rgba(47, 107, 63, 0.11), transparent 34%),
        var(--surface);
    box-shadow: 0 10px 24px rgba(36, 49, 39, 0.05);
}

.route-path::before {
    content: "";
    position: absolute;
    left: 44px;
    right: 44px;
    top: 78px;
    height: 3px;
    border-radius: 999px;
    background: repeating-linear-gradient(
        90deg,
        rgba(47, 107, 63, 0.3) 0 14px,
        transparent 14px 24px
    );
}

.route-step {
    position: relative;
    z-index: 1;
    min-height: 250px;
    padding: 22px;
    border: 1px solid rgba(47, 107, 63, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
}

.route-step-start {
    background: #fff9df;
}

.route-step-end {
    background: #f0f7ed;
}

.route-marker {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    border: 4px solid #fff;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-size: 22px;
    box-shadow: 0 10px 20px rgba(47, 107, 63, 0.22);
}

.route-number {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin-bottom: 10px;
    padding: 5px 9px;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--green-dark);
    font-size: 13px;
    font-weight: 700;
}

.route-step h3 {
    margin: 0 0 10px;
    font-size: 21px;
    font-weight: 800;
}

.route-step p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.route-arrow {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    color: var(--green);
    font-size: 26px;
}

.route-arrow i {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(47, 107, 63, 0.18);
    border-radius: 50%;
    background: var(--surface);
    box-shadow: 0 8px 18px rgba(36, 49, 39, 0.08);
}

.route-finish {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 14px;
    width: fit-content;
    margin: 24px auto 0;
    padding: 14px 18px;
    border-radius: 8px;
    background: var(--green-dark);
    color: #fff;
    box-shadow: var(--shadow);
}

.route-finish i {
    color: var(--accent);
    font-size: 24px;
}

.route-finish span {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 700;
}

.route-finish strong {
    display: block;
    font-size: 18px;
}

.meta-row,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.read-link,
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--green-dark);
    font-weight: 700;
    text-decoration: none;
}

.read-link {
    margin-left: auto;
}

.read-link:hover,
.back-link:hover {
    color: var(--green);
}

.article-view {
    max-width: 840px;
    margin: 0 auto;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.article-meta {
    margin: 26px 0 14px;
}

.article-view h1 {
    margin: 0 0 18px;
    font-size: 40px;
    line-height: 1.12;
    font-weight: 800;
}

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

.article-body {
    color: var(--text);
    font-size: 17px;
    line-height: 1.75;
}

.article-body p {
    margin: 0 0 18px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--green-dark);
    font-size: 13px;
    font-weight: 700;
}

.toolbar {
    display: flex;
    gap: 12px;
    margin: 22px 0;
}

.search-input {
    width: min(440px, 100%);
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.empty-state {
    padding: 24px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.6);
}

@media (max-width: 960px) {
    .wrapper {
        display: block;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .content {
        width: 100%;
        padding: 22px;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .route-path {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .route-path::before {
        left: 56px;
        right: auto;
        top: 44px;
        bottom: 118px;
        width: 3px;
        height: auto;
        background: repeating-linear-gradient(
            180deg,
            rgba(47, 107, 63, 0.3) 0 14px,
            transparent 14px 24px
        );
    }

    .route-step {
        min-height: 0;
        padding-left: 84px;
    }

    .route-marker {
        position: absolute;
        left: 22px;
        top: 22px;
        margin-bottom: 0;
    }

    .route-arrow {
        justify-content: start;
        min-height: 28px;
        padding-left: 32px;
    }

    .route-arrow i {
        transform: rotate(90deg);
    }

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

@media (max-width: 640px) {
    .hero {
        padding: 28px;
    }

    .hero h1 {
        font-size: 34px;
    }

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

    .route-path {
        padding: 18px;
    }

    .route-path::before {
        left: 46px;
    }

    .route-step {
        padding: 18px 18px 18px 72px;
    }

    .route-marker {
        left: 16px;
        top: 18px;
        width: 48px;
        height: 48px;
        font-size: 19px;
    }

    .route-finish {
        width: 100%;
    }

    .read-link {
        width: 100%;
        margin-left: 0;
    }

    .article-view {
        padding: 24px;
    }

    .article-view h1 {
        font-size: 32px;
    }

    .section-head,
    .toolbar {
        align-items: stretch;
        flex-direction: column;
    }
}