/* Инструкции модулей Logictim — общие стили */
.lri-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #3d4555;
    line-height: 1.6;
    font-size: 17px;
    margin: 0 0 2.5rem;
}

.lri-layout {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.lri-layout--full {
    display: block;
    width: 100%;
    max-width: 100%;
}

.lri-layout--full .lri-doc {
    max-width: 100%;
}

.lri-sidebar-col {
    min-width: 0;
}

.lri-sidebar {
    position: sticky;
    top: 16px;
    font-size: 13px;
}

.lri-sidebar__head {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
    color: #1a1a2e;
    margin: 20px 0 8px;
    padding: 0 0 7px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    text-transform: none;
    letter-spacing: 0;
}

.lri-sidebar__head:first-of-type {
    margin-top: 0;
}

.lri-sidebar__head.is-current-section {
    color: #ff6a00;
    border-bottom-color: rgba(255, 106, 0, 0.35);
}

.lri-sidebar__home {
    display: block;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    color: #6b7280 !important;
    text-decoration: none !important;
    font-size: 13px;
}

.lri-sidebar__home:hover {
    color: #ff6a00 !important;
}

.lri-nav {
    list-style: none;
    margin: 0 0 4px;
    padding: 0;
}

.lri-nav li {
    margin: 0;
}

.lri-nav__group {
    margin: 0 0 8px;
    padding: 7px 8px 5px;
    border-radius: 8px;
    background: #eef1f6;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.lri-nav__group:last-child {
    margin-bottom: 2px;
}

.lri-nav__label {
    display: block;
    margin: 0 0 5px;
    padding: 0 2px 5px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    color: #6b7280;
    text-transform: none;
    letter-spacing: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    pointer-events: none;
    user-select: none;
}

.lri-nav__group > ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lri-nav__group.is-current-group {
    background: #fff4eb;
    border-color: rgba(255, 106, 0, 0.22);
}

.lri-nav__group.is-current-group > .lri-nav__label {
    color: #e85d00;
    border-bottom-color: rgba(255, 106, 0, 0.25);
}

.lri-toc-sub {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
    margin: 1.25rem 0 0.35rem !important;
}

.lri-doc h3 + .lri-toc-sub {
    margin-top: 0.5rem !important;
}

.lri-nav a {
    display: block;
    padding: 5px 8px;
    border-radius: 5px;
    color: #3d4555 !important;
    text-decoration: none !important;
    line-height: 1.35;
    font-size: 13px;
    font-weight: 400;
    transition: background 0.15s, color 0.15s;
}

.lri-nav__group a {
    padding-left: 10px;
}

.lri-nav a:hover {
    background: #f6f7fb;
    color: #ff6a00 !important;
}

.lri-nav a.is-active {
    background: transparent;
    color: #1a1a2e !important;
    font-weight: 600;
    box-shadow: inset 2px 0 0 #ff6a00;
}

.lri-nav--main a {
    font-weight: 500;
    font-size: 13px;
}

.lri-nav--extra {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.lri-nav--extra a {
    font-size: 13px;
    font-weight: 400;
}

.lri-nav--dev {
    margin-bottom: 0;
}

.lri-nav--dev a {
    font-size: 13px;
    font-weight: 400;
}

/* Foldable sections (developers / rare) */
.lri-sidebar__head.is-fold-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    margin: 18px 0 6px;
    padding: 0 0 6px;
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
    text-transform: none;
    letter-spacing: 0;
    color: #1a1a2e;
}

.lri-sidebar__head.is-fold-toggle:hover {
    color: #ff6a00;
}

.lri-sidebar__head.is-fold-toggle[aria-expanded="true"] {
    color: #1a1a2e;
    background: transparent;
}

.lri-sidebar__head.is-fold-toggle.is-current-section,
.lri-sidebar__head.is-fold-toggle[aria-expanded="true"].is-current-section {
    color: #ff6a00;
    background: transparent;
    border-bottom-color: rgba(255, 106, 0, 0.35);
}

.lri-sidebar__head.is-fold-toggle::after {
    content: "+";
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    color: inherit;
}

.lri-sidebar__head.is-fold-toggle[aria-expanded="true"]::after {
    content: "-";
}

.lri-nav.is-collapsed {
    display: none;
}

.lri-doc {
    min-width: 0;
}

.lri-doc h1 {
    font-size: 32px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 1rem;
    line-height: 1.2;
}

.lri-doc h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 2.25rem 0 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    scroll-margin-top: 24px;
}

.lri-doc h2:first-of-type {
    border-top: none;
    margin-top: 0.5rem;
    padding-top: 0;
}

.lri-doc h3 {
    font-size: 19px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 0.5rem;
}

.lri-cards + h3,
.lri-note + h3 {
    margin-top: 2rem;
}

.lri-doc p {
    margin: 0 0 1rem;
}

.lri-doc ul,
.lri-doc ol {
    margin: 0 0 1rem;
    padding-left: 1.35rem;
}

.lri-doc li {
    margin-bottom: 0.4rem;
}

.lri-doc a {
    color: #ff6a00;
}

.lri-doc a:hover {
    color: #e85d00;
}

.lri-doc figure {
    margin: 1.1rem 0 1.5rem;
    text-align: center;
}

.lri-doc img.lri-shot {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    margin: 0;
    display: inline-block;
    vertical-align: top;
}

.lri-doc figcaption {
    display: block;
    font-size: 13px;
    font-style: italic;
    color: #6b7280;
    text-align: center;
    margin: 8px auto 0;
    max-width: 42em;
    line-height: 1.4;
}

.lri-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 1rem 0 1.25rem;
}

.lri-pair figure {
    margin: 0;
}

.lri-pair figcaption {
    font-size: 13px;
    font-style: italic;
    color: #6b7280;
    text-align: center;
    margin-top: 8px;
    line-height: 1.35;
}

.lri-doc table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.25rem;
    font-size: 16px;
}

.lri-doc table.lri-api-params {
    table-layout: fixed;
    font-size: 14px;
}

.lri-doc table.lri-api-params th:nth-child(1),
.lri-doc table.lri-api-params td:nth-child(1) {
    width: 16%;
}

.lri-doc table.lri-api-params th:nth-child(2),
.lri-doc table.lri-api-params td:nth-child(2) {
    width: 24%;
}

.lri-doc table.lri-api-params th:nth-child(3),
.lri-doc table.lri-api-params td:nth-child(3) {
    width: 42%;
}

.lri-doc table.lri-api-params th:nth-child(4),
.lri-doc table.lri-api-params td:nth-child(4) {
    width: 18%;
}

.lri-doc table.lri-api-params code {
    white-space: nowrap;
}

.lri-doc th,
.lri-doc td {
    border: 1px solid #e5e7eb;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.lri-doc th {
    background: #f6f7fb;
    font-weight: 600;
}

.lri-doc code {
    background: #f6f7fb;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.9em;
    color: #1a1a2e;
}

.lri-codeblock {
    margin: 1rem 0 1.25rem;
    border-radius: 10px;
    background: #1a1a2e;
    overflow-x: auto;
}

.lri-doc .lri-codeblock pre {
    margin: 0;
    padding: 16px 18px;
    font-size: 14px;
    line-height: 1.55;
    color: #e8eaef !important;
    background: transparent !important;
    white-space: pre;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.lri-doc .lri-codeblock pre code {
    background: transparent !important;
    padding: 0;
    color: #e8eaef !important;
    font-size: inherit;
    border-radius: 0;
}

.lri-lead {
    font-size: 19px;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.lri-path {
    display: inline-block;
    background: #f6f7fb;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 15px;
    margin: 0.5rem 0 1rem;
}

.lri-note,
.lri-warn {
    border-radius: 10px;
    padding: 14px 18px;
    margin: 1rem 0 1.25rem;
    font-size: 16px;
}

.lri-note {
    background: #f0f7ff;
    border-left: 4px solid #3b82f6;
}

.lri-warn {
    background: #fff8f0;
    border-left: 4px solid #ff6a00;
}

.lri-note strong,
.lri-warn strong {
    color: #1a1a2e;
}

.lri-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin: 1.25rem 0;
}

.lri-card {
    display: block;
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    text-decoration: none !important;
    color: #1a1a2e !important;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.lri-card:hover {
    border-color: #ff6a00;
    box-shadow: 0 6px 20px rgba(255, 106, 0, 0.12);
}

.lri-card strong {
    display: block;
    font-size: 17px;
    margin-bottom: 6px;
    color: #ff6a00;
}

.lri-card span {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.45;
}

.lri-card--main {
    border-color: rgba(255, 106, 0, 0.2);
    background: linear-gradient(180deg, #fff 0%, #fffaf6 100%);
}

.lri-setting {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 18px 20px;
    margin: 0 0 14px;
    background: #fff;
}

.lri-setting p:last-child,
.lri-setting ul:last-child,
.lri-setting ol:last-child {
    margin-bottom: 0;
}

.lri-options {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
}

.lri-options li {
    position: relative;
    padding: 10px 0 10px 0;
    margin: 0;
    border-top: 1px solid #f0f1f4;
}

.lri-options li:first-child {
    border-top: none;
    padding-top: 0;
}

.lri-options strong {
    display: block;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.lri-toc {
    background: #f6f7fb;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 0 0 1.5rem;
    font-size: 15px;
}

.lri-toc__title {
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.lri-toc ul {
    margin: 0;
    padding-left: 1.2rem;
    columns: 2;
    column-gap: 24px;
}

.lri-toc a {
    text-decoration: none;
}

.lri-toc a:hover {
    text-decoration: underline;
}

.lri-field-types {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px 16px;
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
}

.lri-field-types li {
    margin: 0;
    padding: 8px 12px;
    background: #f6f7fb;
    border-radius: 8px;
    font-size: 15px;
}

.lri-field-types li strong {
    color: #1a1a2e;
}

.lri-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin: 1.25rem 0;
}

.lri-stat {
    text-align: center;
    padding: 20px 16px;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff 0%, #fffaf6 100%);
    border: 1px solid rgba(255, 106, 0, 0.25);
}

.lri-stat__num {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #ff6a00;
    line-height: 1.2;
}

.lri-stat__label {
    display: block;
    font-size: 14px;
    color: #6b7280;
    margin-top: 6px;
    line-height: 1.4;
}

.lri-accent-box {
    background: linear-gradient(135deg, #fff8f0 0%, #fff 100%);
    border: 1px solid rgba(255, 106, 0, 0.3);
    border-left: 4px solid #ff6a00;
    border-radius: 12px;
    padding: 18px 22px;
    margin: 1.25rem 0;
}

.lri-accent-box p:last-child,
.lri-accent-box ul:last-child {
    margin-bottom: 0;
}

.lri-kw {
    color: #1a1a2e;
    background: #fef3c7;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.lri-breadcrumbs {
    margin: 0 0 1.25rem;
    font-size: 14px;
    color: #6b7280;
}

.lri-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lri-breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}

.lri-breadcrumbs li + li::before {
    content: "›";
    color: #9ca3af;
    margin-right: 2px;
    font-weight: 600;
}

.lri-breadcrumbs a {
    text-decoration: none;
    color: #6b7280;
}

.lri-breadcrumbs a:hover {
    color: #ff6a00;
    text-decoration: underline;
}

.lri-breadcrumbs [aria-current="page"] {
    color: #1a1a2e;
    font-weight: 600;
}

.lri-doc .lri-cta {
    margin: 2.5rem 0 0;
    padding: 36px 32px 32px;
    border-radius: 16px;
    background: linear-gradient(145deg, #ff7a1a 0%, #ff6a00 45%, #e85d00 100%) !important;
    color: #fff !important;
    text-align: center;
    box-shadow: 0 14px 40px rgba(255, 106, 0, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.22);
    position: relative;
    overflow: hidden;
}

.lri-doc .lri-cta::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -15%;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.lri-doc .lri-cta__badge {
    display: inline-block;
    margin: 0 0 14px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff !important;
}

.lri-doc .lri-cta__title {
    margin: 0 0 12px;
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 800;
    color: #fff !important;
    line-height: 1.25;
    position: relative;
}

.lri-doc .lri-cta__lead {
    margin: 0 auto 22px;
    max-width: 520px;
    font-size: 17px;
    color: rgba(255, 255, 255, 0.95) !important;
    line-height: 1.55;
    position: relative;
}

.lri-doc .lri-cta__btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 12px;
    background: #fff !important;
    color: #e85d00 !important;
    font-weight: 800;
    font-size: 17px;
    line-height: 1.3;
    text-decoration: none !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
}

.lri-doc .lri-cta__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
    color: #c44d00 !important;
}

.lri-doc .lri-cta__note {
    margin: 16px 0 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8) !important;
    position: relative;
}

.lri-sidebar-toggle {
    display: none;
    width: 100%;
    margin-bottom: 12px;
    padding: 10px 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    cursor: pointer;
}

@media (max-width: 991px) {
    .lri-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .lri-sidebar-toggle {
        display: block;
    }

    .lri-sidebar {
        position: static;
        display: none;
        padding: 12px 0 20px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        margin-bottom: 16px;
    }

    .lri-sidebar.is-open {
        display: block;
    }

    .lri-toc ul {
        columns: 1;
    }

    .lri-pair {
        grid-template-columns: 1fr;
    }
}
