/* Accent for small text: the brand orange is 3.35:1 on white, under WCAG AA 4.5:1. */
:root,
html[data-theme="light"] {
    --m-accent-text: #985528;
}

html[data-theme="dark"] {
    --m-accent-text: var(--m-accent);
}

/* Landing pages (за домоуправители / за наемодатели) and the blog. Loaded after marketing.css. */

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

.m-more-link {
    display: inline-block;
    margin-top: 0.8rem;
    color: var(--m-brand);
    font-weight: 700;
    text-decoration: none;
}

.m-more-link:hover {
    text-decoration: underline;
}

.m-process-grid--row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 2rem;
}

/* „Скоро в приложението Realistimo“ */
.m-app-teaser-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
    padding: clamp(1.6rem, 4vw, 2.6rem);
    border: 1px dashed color-mix(in srgb, var(--m-brand) 45%, var(--m-line));
    border-radius: 24px;
    background: color-mix(in srgb, var(--m-brand-soft) 45%, var(--m-card));
}

.m-app-teaser-points {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-weight: 600;
}

.m-app-teaser-points li::before {
    margin-right: 0.55rem;
    color: var(--m-accent);
    content: "●";
}

/* FAQ */
.m-faq-list {
    display: grid;
    gap: 0.65rem;
    max-width: 52rem;
    margin-top: 2rem;
}

.m-faq-item {
    padding: 1rem 1.25rem;
    border: 1px solid var(--m-line);
    border-radius: 14px;
    background: var(--m-card);
}

.m-faq-item summary {
    cursor: pointer;
    font-weight: 700;
}

.m-faq-item p {
    margin: 0.75rem 0 0;
    color: var(--m-muted);
    line-height: 1.6;
}

/* Blog */
.m-blog {
    flex: 1;
    padding: 2.4rem 0 3.5rem;
}

.m-blog-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.8rem;
}

.m-blog-tabs a {
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--m-line);
    border-radius: 999px;
    color: var(--m-ink);
    background: var(--m-card);
    font-weight: 600;
    text-decoration: none;
}

.m-blog-tabs a[aria-current="page"] {
    border-color: var(--m-brand);
    color: #fff;
    background: var(--m-brand);
}

.m-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.m-blog-card {
    overflow: hidden;
    border: 1px solid var(--m-line);
    border-radius: 18px;
    background: var(--m-card);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.m-blog-card:hover {
    border-color: color-mix(in srgb, var(--m-brand) 35%, var(--m-line));
    box-shadow: var(--m-shadow);
}

.m-blog-card-link {
    display: flex;
    height: 100%;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}

.m-blog-card-img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.m-blog-card-meta,
.m-blog-card h3,
.m-blog-card p {
    margin: 0;
    padding-inline: 1.2rem;
}

.m-blog-card-meta {
    padding-top: 1.1rem;
    color: var(--m-accent-text);
    font-size: 0.78rem;
    font-weight: 700;
}

.m-blog-card h3 {
    padding-top: 0.45rem;
    font-size: 1.1rem;
    line-height: 1.3;
}

.m-blog-card p {
    padding-block: 0.55rem 1.2rem;
    color: var(--m-muted);
    line-height: 1.55;
}

.m-blog-empty {
    color: var(--m-muted);
}

.m-blog-empty a,
.m-blog-pager a,
.m-article-crumbs a {
    color: var(--m-brand);
    font-weight: 600;
}

.m-blog-pager {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    color: var(--m-muted);
}

.m-article {
    max-width: 46rem;
    margin: 0 auto;
}

.m-article-crumbs {
    display: flex;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.m-article h1 {
    margin: 0.8rem 0 0.6rem;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.m-article-meta {
    margin: 0 0 1.6rem;
    color: var(--m-muted);
    font-size: 0.9rem;
}

.m-article-hero {
    width: 100%;
    height: auto;
    margin-bottom: 1.6rem;
    border-radius: 18px;
}

.m-article-body {
    font-size: 1.06rem;
    line-height: 1.75;
}

.m-article-body h2 {
    margin: 2.2rem 0 0.7rem;
    font-size: 1.5rem;
    line-height: 1.25;
}

.m-article-body h3 {
    margin: 1.8rem 0 0.5rem;
    font-size: 1.2rem;
}

.m-article-body a {
    color: var(--m-brand);
}

.m-article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.m-article-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.m-article-body th,
.m-article-body td {
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--m-line);
    text-align: left;
}

.m-article-body blockquote {
    margin: 1.4rem 0;
    padding: 0.2rem 1.2rem;
    border-left: 4px solid var(--m-accent);
    color: var(--m-muted);
}

.m-blog-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    align-items: center;
    justify-content: space-between;
    margin: 2.6rem 0 0;
    padding: 1.5rem;
    border: 1px solid color-mix(in srgb, var(--m-brand) 30%, var(--m-line));
    border-radius: 18px;
    background: color-mix(in srgb, var(--m-brand-soft) 45%, var(--m-card));
}

.m-blog-cta strong {
    font-size: 1.15rem;
}

.m-blog-cta p {
    margin: 0.35rem 0 0;
    color: var(--m-muted);
}

.m-blog-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.m-article-related {
    max-width: 72rem;
    margin: 3.5rem auto 0;
}

.m-article-related h2 {
    margin: 0;
    font-size: 1.4rem;
}

@media (max-width: 1020px) {
    .m-audience-grid--two,
    .m-audience-grid--four,
    .m-app-teaser-inner,
    .m-process-grid--row {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    .m-blog-grid {
        grid-template-columns: 1fr;
    }

    /* Light header (blog, registry): same compact sizing the hero nav gets in marketing.css. */
    .m-registry-nav {
        gap: 0.5rem;
    }

    .m-registry-nav .m-nav-actions {
        gap: 0.45rem;
    }

    .m-registry-nav .m-btn {
        min-height: 2.5rem;
        padding-inline: 0.8rem;
        font-size: 0.82rem;
    }
}

/* Login + Регистрация must both fit a 390px phone; the toggle stays in the footer. */
@media (max-width: 420px) {
    .m-nav .theme-toggle,
    .m-registry-nav .theme-toggle {
        display: none;
    }
}

/* Footer now carries the landing pages and blog: let the links wrap on phones. */
.m-footer-actions {
    flex-wrap: wrap;
}

/* Price line under the closing CTA (dark band). */
.m-cta-offer {
    margin: 0.4rem 0 1.4rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

.m-cta-offer a {
    color: #fff;
}

/* Pricing page */
.m-offer {
    margin: 0 0 1.8rem;
}

.m-price-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.m-price-card {
    padding: 1.6rem;
    border: 1px solid var(--m-line);
    border-radius: 18px;
    background: var(--m-card);
}

.m-price-card--main {
    border-color: color-mix(in srgb, var(--m-brand) 40%, var(--m-line));
    box-shadow: var(--m-shadow);
}

.m-price-card h2 {
    margin: 0.4rem 0 0.6rem;
    font-size: 2.4rem;
}

.m-price-card p {
    color: var(--m-muted);
    line-height: 1.6;
}

.m-price-card ul {
    display: grid;
    gap: 0.55rem;
    margin: 1rem 0 1.4rem;
    padding: 0;
    list-style: none;
}

.m-price-card li::before {
    margin-right: 0.55rem;
    color: var(--m-ok);
    content: "✓";
    font-weight: 800;
}

.m-pricing-who {
    margin-top: 3rem;
}

.m-pricing-who h2 {
    margin: 0;
    font-size: 1.6rem;
}

@media (max-width: 760px) {
    .m-price-grid {
        grid-template-columns: 1fr;
    }
}

/* Blog hub: topic cards */
.m-blog-intro .m-registry-lead + .m-registry-lead {
    margin-top: 0.7rem;
}

.m-topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.8rem;
    margin-bottom: 2.4rem;
}

.m-topic-card {
    display: grid;
    gap: 0.4rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--m-line);
    border-radius: 16px;
    color: var(--m-ink);
    background: var(--m-card);
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.m-topic-card:hover {
    border-color: color-mix(in srgb, var(--m-brand) 40%, var(--m-line));
    box-shadow: var(--m-shadow);
}

.m-topic-card span {
    color: var(--m-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.m-topic-card small {
    color: var(--m-accent-text);
    font-weight: 700;
}

.m-blog-section-title {
    margin: 0;
    font-size: 1.4rem;
}

/* Article: contents and author */
.m-article-meta a {
    color: inherit;
    font-weight: 600;
}

.m-article-toc {
    margin: 0 0 1.8rem;
    padding: 1rem 1.3rem;
    border: 1px solid var(--m-line);
    border-radius: 14px;
    background: var(--m-card);
}

.m-article-toc ol {
    margin: 0.6rem 0 0;
    padding-left: 1.2rem;
    line-height: 1.7;
}

.m-article-toc a {
    color: var(--m-brand);
}

.m-article-body h2 {
    scroll-margin-top: 1.5rem;
}

.m-article-body .m-note {
    margin: 1.4rem 0;
    padding: 1rem 1.2rem;
    border-radius: 14px;
    background: color-mix(in srgb, var(--m-brand-soft) 50%, var(--m-card));
}

.m-article-author {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-top: 1.6rem;
    padding: 1.2rem;
    border: 1px solid var(--m-line);
    border-radius: 16px;
    background: var(--m-card);
}

.m-article-author img {
    flex: none;
    border-radius: 50%;
    object-fit: cover;
}

.m-article-author a {
    color: var(--m-ink);
}

.m-article-author p {
    margin: 0.3rem 0 0;
    color: var(--m-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

/* Owner → manager invite note on /za-domoupraviteli?pokana= */
.m-referral {
    margin: 0 0 1.2rem;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    font-weight: 600;
    line-height: 1.5;
}

/* Pilot lead form */
.m-lead-wrap {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 2.4rem;
    align-items: start;
}

.m-lead-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    padding: 1.5rem;
    border: 1px solid var(--m-line);
    border-radius: 18px;
    background: var(--m-card);
}

.m-lead-form label {
    display: grid;
    gap: 0.35rem;
    color: var(--m-muted);
    font-size: 0.88rem;
    font-weight: 600;
}

.m-lead-form input,
.m-lead-form select,
.m-lead-form textarea {
    width: 100%;
    min-height: 2.7rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--m-line);
    border-radius: 10px;
    color: var(--m-ink);
    background: var(--m-bg);
    font: inherit;
}

.m-lead-wide {
    grid-column: 1 / -1;
}

.m-lead-hp {
    position: absolute;
    left: -9999px;
}

.m-lead-error {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--m-danger);
    font-weight: 600;
}

.m-lead-note {
    margin: 0;
    color: var(--m-muted);
    font-size: 0.82rem;
}

.m-lead-note a {
    color: var(--m-brand);
}

.m-lead-done {
    padding: 1.5rem;
    border: 1px solid color-mix(in srgb, var(--m-ok) 40%, var(--m-line));
    border-radius: 18px;
    background: var(--m-card);
}

@media (max-width: 900px) {
    .m-lead-wrap,
    .m-lead-form {
        grid-template-columns: 1fr;
    }
}

/* /vhod/{code} landing from the entrance QR */
.m-join-steps {
    display: grid;
    gap: 0.7rem;
    max-width: 38rem;
    margin: 0 0 1.8rem;
    padding-left: 1.3rem;
    font-size: 1.05rem;
    line-height: 1.55;
}

.m-blog .m-article-crumbs + .m-registry-intro {
    margin-top: 1.2rem;
}

/* Glossary (/blog/rechnik) */
.m-glossary-index {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.9rem;
    margin: 0 0 2rem;
    font-size: 0.92rem;
}

.m-glossary-index a {
    color: var(--m-brand);
}

.m-glossary {
    margin: 0;
}

.m-glossary-item {
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--m-line);
    scroll-margin-top: 1.5rem;
}

.m-glossary dt {
    font-size: 1.15rem;
    font-weight: 700;
}

.m-glossary dd {
    margin: 0.4rem 0 0;
    line-height: 1.65;
}

.m-glossary-source {
    display: inline-block;
    margin-left: 0.4rem;
    color: var(--m-muted);
    font-size: 0.85rem;
}

.m-glossary dd .m-more-link {
    display: block;
    margin-top: 0.4rem;
}

.m-glossary-note {
    margin-top: 1.6rem;
    color: var(--m-muted);
}

.m-glossary-note a {
    color: var(--m-brand);
}
