/*
Theme Name: gram.quest
Theme URI: https://gram.quest/
Description: Developer-focused child theme for gram.quest.
Author: gram.quest
Template: reboot
Version: 1.2.1
Text Domain: gram-rest
*/

:root {
    --gram-green: #24a06b;
    --gram-green-dark: #197a50;
    --gram-green-soft: #eaf7f1;
    --gram-ink: #17231d;
    --gram-muted: #66736c;
    --gram-line: #dfe7e2;
    --gram-surface: #ffffff;
}

/* Header */
.site-header {
    position: relative;
    z-index: 30;
    background: var(--gram-surface);
    border-top: 4px solid var(--gram-green);
    border-bottom: 1px solid var(--gram-line);
    box-shadow: none;
}

.site-header-inner {
    min-height: 84px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-branding {
    display: flex;
    align-items: center;
    min-width: 0;
}

.site-branding__body {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-title,
.site-title a {
    display: inline-flex;
    align-items: baseline;
    color: var(--gram-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1.5px;
    text-decoration: none;
    white-space: nowrap;
}

.site-title a:hover {
    color: var(--gram-ink);
    text-decoration: none;
}

.site-title__accent {
    color: var(--gram-green);
}

.site-description {
    max-width: 390px;
    margin: 0;
    padding-left: 20px;
    border-left: 1px solid var(--gram-line);
    color: var(--gram-muted);
    font-size: 13px;
    line-height: 1.45;
}

.header-search {
    margin-left: auto;
}

.header-search .search-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gram-line);
    border-radius: 9px;
    color: var(--gram-ink);
    background: #fff;
    transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}

.header-search .search-icon:hover {
    color: var(--gram-green-dark);
    border-color: var(--gram-green);
    background: var(--gram-green-soft);
}

/* Primary navigation */
.main-navigation {
    position: relative;
    z-index: 29;
    background: #fff;
    border-bottom: 1px solid var(--gram-line);
    box-shadow: none;
}

.main-navigation-inner {
    min-height: 50px;
    display: flex;
    align-items: center;
}

.main-navigation ul {
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-navigation ul li a {
    position: relative;
    padding: 15px 13px;
    color: #35423b;
    font-size: 14px;
    font-weight: 650;
    line-height: 20px;
    text-decoration: none;
    transition: color .2s ease, background-color .2s ease;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a,
.main-navigation ul li.current-menu-ancestor > a {
    color: var(--gram-green-dark);
    background: var(--gram-green-soft);
}

.main-navigation ul li.current-menu-item > a::after,
.main-navigation ul li.current-menu-ancestor > a::after {
    content: "";
    position: absolute;
    left: 13px;
    right: 13px;
    bottom: 7px;
    height: 2px;
    border-radius: 2px;
    background: var(--gram-green);
}

.main-navigation .sub-menu {
    align-items: stretch;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--gram-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(23, 35, 29, .12);
}

.main-navigation .sub-menu li a {
    padding: 10px 12px;
    border-radius: 7px;
}

/* Search overlay */
.search-screen {
    background: #fff;
}

.search-screen .search-form input[type="search"] {
    border-color: var(--gram-line);
}

.search-screen .search-form input[type="search"]:focus {
    border-color: var(--gram-green);
    box-shadow: 0 0 0 3px rgba(36, 160, 107, .15);
}

/* Mobile header */
.humburger {
    color: var(--gram-ink);
}

.humburger span {
    background-color: currentColor;
}

@media (max-width: 991px) {
    .site-header-inner {
        min-height: 68px;
        gap: 14px;
    }

    .site-title,
    .site-title a {
        font-size: 25px;
    }

    .site-description {
        display: none;
    }

    .header-search .search-icon {
        width: 38px;
        height: 38px;
    }

    .main-navigation ul {
        display: block;
    }

    .main-navigation ul li a {
        padding: 13px 18px;
    }

    .main-navigation ul li.current-menu-item > a::after,
    .main-navigation ul li.current-menu-ancestor > a::after {
        top: 10px;
        right: auto;
        bottom: 10px;
        left: 6px;
        width: 3px;
        height: auto;
    }
}

@media (max-width: 575px) {
    .site-header {
        border-top-width: 3px;
    }

    .site-header-inner {
        min-height: 62px;
    }

    .site-title,
    .site-title a {
        font-size: 23px;
        letter-spacing: -1px;
    }
}

/* Front page */
.home .site-content,
.page-template-front-page .site-content {
    width: 100%;
    max-width: none;
    padding: 0;
}

.home .site-content-inner,
.page-template-front-page .site-content-inner {
    display: block;
    width: 100%;
    max-width: none;
}

.gram-home {
    width: 100%;
    overflow: hidden;
    color: var(--gram-ink);
    background: #fff;
}

.gram-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.gram-hero {
    position: relative;
    padding: 76px 0 82px;
    background:
        radial-gradient(circle at 84% 20%, rgba(36,160,107,.16), transparent 28%),
        linear-gradient(180deg, #fbfdfc 0%, #f4f9f6 100%);
    border-bottom: 1px solid var(--gram-line);
}

.gram-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .3;
    pointer-events: none;
    background-image: linear-gradient(rgba(36,160,107,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(36,160,107,.09) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(to right, transparent, #000 55%, #000);
}

.gram-hero__grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(400px, .88fr);
    gap: 74px;
    align-items: center;
}

.gram-eyebrow,
.gram-kicker {
    margin: 0 0 16px;
    color: var(--gram-green-dark);
    font: 700 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.gram-hero__content {
    position: relative;
    padding-top: 38px;
}

.gram-eyebrow {
    position: absolute;
    top: 0;
    left: -108px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: auto;
    margin: 0;
    text-align: left;
}

.gram-eyebrow span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gram-green);
    box-shadow: 0 0 0 5px rgba(36,160,107,.12);
}

.gram-hero h1 {
    max-width: 720px;
    margin: 0;
    font-size: clamp(48px, 5vw, 76px);
    line-height: .98;
    letter-spacing: -.055em;
}

.gram-hero h1 em {
    position: relative;
    color: var(--gram-green);
    font-style: normal;
}

.gram-hero__lead {
    max-width: 680px;
    margin: 26px 0 30px;
    color: #526159;
    font-size: 18px;
    line-height: 1.65;
}

.gram-search {
    display: flex;
    align-items: center;
    max-width: 680px;
    min-height: 58px;
    padding: 6px;
    border: 1px solid #cad8d0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(23,35,29,.08);
}

.gram-search:focus-within {
    border-color: var(--gram-green);
    box-shadow: 0 0 0 4px rgba(36,160,107,.12), 0 12px 32px rgba(23,35,29,.08);
}

.gram-search__icon {
    width: 18px;
    height: 18px;
    margin: 0 12px 0 10px;
    border: 2px solid #6e7b74;
    border-radius: 50%;
    position: relative;
}

.gram-search__icon::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 2px;
    right: -5px;
    bottom: -2px;
    transform: rotate(45deg);
    background: #6e7b74;
}

.gram-search input[type="search"] {
    min-width: 0;
    flex: 1;
    height: 44px;
    padding: 0 8px;
    border: 0;
    outline: 0;
    color: var(--gram-ink);
    background: transparent;
    font-size: 15px;
}

.gram-search button {
    height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--gram-green);
    font-weight: 700;
    cursor: pointer;
}

.gram-search button:hover {
    background: var(--gram-green-dark);
}

.gram-hero__actions {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 22px;
}

.gram-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
}

.gram-button--primary {
    color: #fff;
    background: var(--gram-ink);
}

.gram-button--primary:hover {
    color: #fff;
    background: var(--gram-green-dark);
    text-decoration: none;
}

.gram-text-link {
    color: var(--gram-green-dark);
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
}

.gram-text-link:hover {
    color: var(--gram-green);
    text-decoration: none;
}

.gram-text-link span {
    display: inline-block;
    margin-left: 5px;
    transition: transform .2s ease;
}

.gram-text-link:hover span {
    transform: translateX(4px);
}

.gram-code-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    color: #d7e7df;
    background: #14231c;
    box-shadow: 0 28px 70px rgba(20,35,28,.28);
    transform: rotate(1deg);
}

.gram-code-card::after {
    content: "";
    position: absolute;
    width: 190px;
    height: 190px;
    top: -90px;
    right: -80px;
    border-radius: 50%;
    background: rgba(36,160,107,.22);
    filter: blur(8px);
}

.gram-code-card__top,
.gram-code-card__footer {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    color: #84998e;
    font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.gram-code-card__top > span {
    margin-left: 14px;
}

.gram-code-card__top > b {
    margin-left: auto;
    color: #68d99f;
}

.gram-code-card__dots {
    display: flex;
    gap: 5px;
}

.gram-code-card__dots i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #43574d;
}

.gram-code-card pre {
    position: relative;
    z-index: 1;
    overflow: auto;
    margin: 0;
    padding: 28px 24px;
    color: #d7e7df;
    background: transparent;
    font: 500 13px/1.75 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.gram-code--method,
.gram-code--key {
    color: #68d99f;
}

.gram-code--value {
    color: #d5bd78;
}

.gram-code-card__footer {
    border-top: 1px solid rgba(255,255,255,.08);
    border-bottom: 0;
}

.gram-code-card__footer > span {
    width: 7px;
    height: 7px;
    margin-right: 8px;
    border-radius: 50%;
    background: #68d99f;
    box-shadow: 0 0 0 4px rgba(104,217,159,.1);
}

.gram-code-card__footer b {
    margin-left: auto;
    color: #84998e;
}

.gram-section {
    padding: 90px 0;
}

.gram-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 38px;
}

.gram-section-heading--stacked {
    display: block;
}

.gram-section-heading h2,
.gram-principles h2,
.gram-final-cta h2 {
    margin: 0;
    color: var(--gram-ink);
    font-size: clamp(34px, 4vw, 50px);
    line-height: 1.08;
    letter-spacing: -.04em;
}

.gram-section-heading > p {
    max-width: 440px;
    margin: 0;
    color: var(--gram-muted);
    line-height: 1.65;
}

.gram-topic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.gram-topic-card {
    position: relative;
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) 24px;
    gap: 18px;
    align-items: start;
    padding: 24px;
    border: 1px solid var(--gram-line);
    border-radius: 13px;
    color: var(--gram-ink);
    background: #fff;
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.gram-topic-card:hover {
    color: var(--gram-ink);
    border-color: rgba(36,160,107,.55);
    box-shadow: 0 16px 36px rgba(23,35,29,.08);
    text-decoration: none;
    transform: translateY(-3px);
}

.gram-topic-card__mark {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--gram-green-dark);
    background: var(--gram-green-soft);
    font: 800 13px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.gram-topic-card__body {
    display: block;
}

.gram-topic-card__body strong {
    display: block;
    margin: 1px 0 7px;
    font-size: 18px;
}

.gram-topic-card__body > span {
    display: block;
    color: var(--gram-muted);
    font-size: 14px;
    line-height: 1.55;
}

.gram-topic-card__arrow {
    color: #8c9992;
    font-size: 18px;
}

.gram-topic-card:hover .gram-topic-card__arrow {
    color: var(--gram-green);
}

.gram-find {
    background: #f5f8f6;
    border-top: 1px solid var(--gram-line);
    border-bottom: 1px solid var(--gram-line);
}

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

.gram-path-card {
    padding: 30px;
    border: 1px solid var(--gram-line);
    border-radius: 14px;
    background: #fff;
}

.gram-path-card__number {
    color: var(--gram-green);
    font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.gram-path-card h3 {
    margin: 22px 0 8px;
    font-size: 21px;
}

.gram-path-card p {
    margin: 0 0 20px;
    color: var(--gram-muted);
    font-size: 14px;
}

.gram-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gram-chip-list a {
    padding: 7px 10px;
    border: 1px solid var(--gram-line);
    border-radius: 7px;
    color: #45534b;
    background: #fbfcfb;
    font: 650 12px/1.2 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    text-decoration: none;
}

.gram-chip-list a:hover {
    color: var(--gram-green-dark);
    border-color: var(--gram-green);
    background: var(--gram-green-soft);
    text-decoration: none;
}

.gram-guide-card {
    min-height: 270px;
    border: 1px solid var(--gram-line);
    border-radius: 14px;
    background: #fff;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.gram-guide-card:hover {
    border-color: rgba(36,160,107,.5);
    box-shadow: 0 16px 36px rgba(23,35,29,.08);
    transform: translateY(-3px);
}

.gram-guide-card__link {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 28px;
    color: var(--gram-ink);
    text-decoration: none;
}

.gram-guide-card__link:hover {
    color: var(--gram-ink);
    text-decoration: none;
}

.gram-guide-card__category {
    color: var(--gram-green-dark);
    font: 750 11px/1.3 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.gram-guide-card h3 {
    margin: 20px 0 12px;
    font-size: 21px;
    line-height: 1.28;
}

.gram-guide-card p {
    margin: 0 0 24px;
    color: var(--gram-muted);
    font-size: 14px;
    line-height: 1.6;
}

.gram-guide-card__read {
    margin-top: auto;
    color: var(--gram-green-dark);
    font-size: 13px;
    font-weight: 750;
}

.gram-guide-card__read b {
    margin-left: 5px;
}

.gram-guide-card--placeholder {
    background: linear-gradient(145deg, #fff, #f7faf8);
}

.gram-principles {
    color: #fff;
    background: var(--gram-ink);
}

.gram-principles h2 {
    color: #fff;
}

.gram-principles .gram-kicker {
    color: #68d99f;
}

.gram-principles__grid {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 90px;
    align-items: start;
}

.gram-principle-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.12);
}

.gram-principle-list > div {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 14px;
    padding: 24px;
    background: var(--gram-ink);
}

.gram-principle-list b {
    color: #68d99f;
    font: 700 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.gram-principle-list span {
    color: #9fb0a7;
    font-size: 13px;
    line-height: 1.5;
}

.gram-principle-list strong {
    display: block;
    margin-bottom: 5px;
    color: #fff;
    font-size: 15px;
}

.gram-final-cta {
    padding: 72px 0;
    background: var(--gram-green-soft);
    border-bottom: 1px solid var(--gram-line);
}

.gram-final-cta__inner {
    display: grid;
    grid-template-columns: 1fr .8fr;
    gap: 70px;
    align-items: center;
}

.gram-final-cta h2 {
    font-size: clamp(32px, 4vw, 44px);
}

.gram-final-cta p:not(.gram-kicker) {
    margin: 14px 0 0;
    color: var(--gram-muted);
}

.gram-search--light {
    max-width: none;
}

@media (max-width: 991px) {
    .gram-hero__content {
        padding-top: 0;
    }

    .gram-eyebrow {
        position: static;
        width: 100%;
        margin: 0 0 16px;
    }

    .gram-hero {
        padding: 58px 0 64px;
    }

    .gram-hero__grid {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .gram-code-card {
        max-width: 620px;
        transform: none;
    }

    .gram-section {
        padding: 70px 0;
    }

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

    .gram-principles__grid,
    .gram-final-cta__inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Premium navigation sidebar */
.gram-sidebar {
    position: relative;
    overflow: hidden;
    padding: 1px;
    border: 1px solid rgba(36, 160, 107, .18);
    border-radius: 26px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.96), rgba(234,247,241,.88)) padding-box,
        linear-gradient(145deg, rgba(36,160,107,.36), rgba(255,255,255,.8)) border-box;
    box-shadow: 0 24px 70px rgba(23, 35, 29, .12);
}

.gram-sidebar__glow {
    position: absolute;
    width: 260px;
    height: 260px;
    top: -130px;
    right: -110px;
    border-radius: 50%;
    background: rgba(36,160,107,.16);
    filter: blur(15px);
    pointer-events: none;
}

.gram-sidebar__inner {
    position: relative;
    z-index: 1;
    padding: 32px 26px 24px;
}

.gram-sidebar__eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid rgba(36,160,107,.22);
    border-radius: 999px;
    color: var(--gram-green-dark);
    background: rgba(255,255,255,.68);
    font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: .1em;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

.gram-sidebar h2 {
    margin: 22px 0 9px;
    color: var(--gram-ink);
    font-size: 34px;
    line-height: 1.05;
    letter-spacing: -.04em;
}

.gram-sidebar__intro {
    margin: 0 0 22px;
    color: var(--gram-muted);
    font-size: 14px;
    line-height: 1.55;
}

.gram-sidebar-search {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) 34px;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
    padding: 6px 7px 6px 12px;
    border: 1px solid rgba(36,160,107,.2);
    border-radius: 12px;
    background: rgba(255,255,255,.86);
    box-shadow: 0 8px 22px rgba(23,35,29,.05);
}

.gram-sidebar-search:focus-within {
    border-color: var(--gram-green);
    box-shadow: 0 0 0 3px rgba(36,160,107,.12);
}

.gram-sidebar-search > span {
    position: relative;
    width: 15px;
    height: 15px;
    border: 2px solid #75837b;
    border-radius: 50%;
}

.gram-sidebar-search > span::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 2px;
    right: -5px;
    bottom: -2px;
    background: #75837b;
    transform: rotate(45deg);
}

.gram-sidebar-search input[type="search"] {
    min-width: 0;
    height: 36px;
    padding: 0;
    border: 0;
    outline: 0;
    color: var(--gram-ink);
    background: transparent;
    font-size: 13px;
}

.gram-sidebar-search button {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--gram-green);
    font-size: 17px;
    cursor: pointer;
}

.gram-sidebar-search button:hover {
    background: var(--gram-green-dark);
}

.gram-sidebar-topics {
    display: grid;
    gap: 10px;
}

.gram-sidebar-topics > a {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 20px;
    gap: 13px;
    align-items: center;
    min-height: 68px;
    padding: 10px 12px;
    border: 1px solid rgba(36,160,107,.14);
    border-radius: 14px;
    color: var(--gram-ink);
    background: rgba(255,255,255,.82);
    box-shadow: 0 9px 25px rgba(23,35,29,.05), inset 0 1px 0 rgba(255,255,255,.9);
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.gram-sidebar-topics > a:hover {
    color: var(--gram-ink);
    border-color: rgba(36,160,107,.5);
    background: #fff;
    box-shadow: 0 14px 32px rgba(23,35,29,.09);
    text-decoration: none;
    transform: translateY(-2px);
}

.gram-sidebar-topic__icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(36,160,107,.18);
    border-radius: 12px;
    color: var(--gram-green-dark);
    background: linear-gradient(145deg, #fff, var(--gram-green-soft));
    font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    box-shadow: inset 0 1px 0 #fff;
}

.gram-sidebar-topic__copy {
    min-width: 0;
}

.gram-sidebar-topic__copy strong,
.gram-sidebar-topic__copy small {
    display: block;
}

.gram-sidebar-topic__copy strong {
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.2;
}

.gram-sidebar-topic__copy small {
    overflow: hidden;
    color: #77857d;
    font-size: 11px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gram-sidebar-topic__arrow {
    color: rgba(36,160,107,.55);
    font-size: 17px;
    transition: transform .2s ease, color .2s ease;
}

.gram-sidebar-topics > a:hover .gram-sidebar-topic__arrow {
    color: var(--gram-green);
    transform: translateX(3px);
}

.gram-sidebar__footer {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid rgba(36,160,107,.14);
    color: #66766d;
}

.gram-sidebar__footer > span {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--gram-green);
    box-shadow: 0 0 0 5px rgba(36,160,107,.1);
}

.gram-sidebar__footer strong {
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 991px) {
    .gram-sidebar {
        width: min(100% - 28px, 680px);
        margin: 34px auto 60px;
    }

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

@media (max-width: 575px) {
    .gram-sidebar {
        border-radius: 20px;
    }

    .gram-sidebar__inner {
        padding: 24px 18px 20px;
    }

    .gram-sidebar-topics {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .gram-shell {
        width: min(100% - 28px, 1180px);
    }

    .gram-hero h1 {
        font-size: clamp(43px, 13vw, 58px);
    }

    .gram-hero__lead {
        font-size: 16px;
    }

    .gram-search {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .gram-search__icon {
        margin-top: 13px;
    }

    .gram-search input[type="search"] {
        width: calc(100% - 58px);
    }

    .gram-search button {
        width: 100%;
        margin-top: 6px;
    }

    .gram-hero__actions,
    .gram-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .gram-topic-grid,
    .gram-path-grid,
    .gram-guide-grid,
    .gram-principle-list {
        grid-template-columns: 1fr;
    }

    .gram-topic-card {
        grid-template-columns: 44px minmax(0, 1fr) 20px;
        gap: 14px;
        padding: 20px;
    }

    .gram-topic-card__mark {
        width: 44px;
        height: 44px;
    }

    .gram-code-card pre {
        padding: 22px 18px;
        font-size: 11px;
    }
}
