/* מארג — אתר תדמית והדרכה. CSS וניל, ללא build. */

:root {
    --brand: #0b7a5f;
    --brand-strong: #06553f;
    --brand-soft: #e8f5f0;
    --brand-tint: #f2faf7;

    --ink: #14201c;
    --body: #4a5a55;
    --muted: #7b8a85;

    --surface: #ffffff;
    --page: #f6f9f8;
    --line: #e0e8e5;
    --line-strong: #c9d6d1;

    --warn-bg: #fff8e8;
    --warn-line: #f0d9a2;
    --warn-ink: #7a5a12;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(20, 32, 28, 0.05), 0 8px 24px rgba(20, 32, 28, 0.06);

    --maxw: 1180px;
    --sidebar: 264px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
}

body {
    margin: 0;
    font-family: 'Heebo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    font-size: 17px;
    line-height: 1.75;
    color: var(--body);
    background: var(--page);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    color: var(--ink);
    line-height: 1.3;
    margin: 0 0 0.5em;
    font-weight: 700;
    letter-spacing: -0.01em;
}

p {
    margin: 0 0 1em;
}

a {
    color: var(--brand);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--brand-strong);
}

strong {
    color: var(--ink);
    font-weight: 600;
}

code {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.88em;
    background: var(--brand-soft);
    color: var(--brand-strong);
    padding: 0.12em 0.42em;
    border-radius: 5px;
    direction: ltr;
    display: inline-block;
}

/* ─── כפתורים ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.72rem 1.4rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
}

.btn-primary:hover {
    background: var(--brand-strong);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--brand);
    border-color: var(--line-strong);
}

.btn-ghost:hover {
    background: var(--brand-soft);
    border-color: var(--brand);
}

.btn-lg {
    padding: 0.9rem 1.9rem;
    font-size: 1.06rem;
}

/* ─── סרגל עליון ─── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0.72rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: baseline;
    gap: 0.6rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.brand span {
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0;
}

.topbar-links {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    font-size: 0.96rem;
}

.topbar-links a:not(.btn) {
    color: var(--body);
    text-decoration: none;
    font-weight: 500;
}

.topbar-links a:not(.btn):hover {
    color: var(--brand);
}

/* ─── פריסת המדריך ─── */
.layout {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 1.5rem 5rem;
    display: grid;
    grid-template-columns: var(--sidebar) 1fr;
    gap: 3rem;
    align-items: start;
}

.toc {
    position: sticky;
    top: 76px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    padding: 1.5rem 0;
    font-size: 0.93rem;
    overscroll-behavior: contain;
}

.toc h2 {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 0.9rem;
    font-weight: 700;
}

.toc ol {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: toc;
}

.toc li {
    counter-increment: toc;
}

.toc a {
    display: flex;
    gap: 0.6rem;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    color: var(--body);
    text-decoration: none;
    border-inline-start: 2px solid transparent;
    line-height: 1.4;
}

.toc a::before {
    content: counter(toc);
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    font-size: 0.85em;
    min-width: 1.1em;
}

.toc a:hover {
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.toc a.active {
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-weight: 600;
    border-inline-start-color: var(--brand);
}

.toc a.active::before {
    color: var(--brand);
}

.toc-toggle {
    display: none;
}

/* ─── תוכן ─── */
.content {
    min-width: 0;
    padding-top: 1.5rem;
}

.guide-head {
    padding: 2rem 0 1rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 2rem;
}

.guide-head h1 {
    font-size: clamp(2rem, 4vw, 2.7rem);
    margin-bottom: 0.4rem;
}

.guide-head .lead {
    font-size: 1.12rem;
    color: var(--body);
    max-width: 62ch;
    margin: 0;
}

section.chapter {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--line);
}

section.chapter:last-of-type {
    border-bottom: 0;
}

section.chapter > h2 {
    font-size: 1.75rem;
    margin-bottom: 0.6rem;
    scroll-margin-top: 84px;
}

section.chapter h3 {
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    color: var(--brand-strong);
}

section.chapter h4 {
    font-size: 1.02rem;
    margin-top: 1.4rem;
    margin-bottom: 0.35rem;
}

.chapter-lead {
    font-size: 1.06rem;
    color: var(--body);
    max-width: 68ch;
}

/* ─── רשימות צעדים ─── */
ol.steps {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin: 1.2rem 0;
}

ol.steps > li {
    counter-increment: step;
    position: relative;
    padding-inline-start: 2.6rem;
    margin-bottom: 1rem;
}

ol.steps > li::before {
    content: counter(step);
    position: absolute;
    inset-inline-start: 0;
    top: 0.15rem;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-weight: 700;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-variant-numeric: tabular-nums;
}

ul.plain {
    margin: 1rem 0;
    padding-inline-start: 1.3rem;
}

ul.plain li {
    margin-bottom: 0.5rem;
}

/* ─── תווית של אלמנט בממשק ─── */
.ui {
    display: inline-block;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 5px;
    padding: 0.04em 0.45em;
    font-size: 0.93em;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    box-shadow: 0 1px 0 rgba(20, 32, 28, 0.05);
}

.ui-field {
    border-style: dashed;
    font-weight: 500;
    box-shadow: none;
    background: var(--brand-tint);
}

/* ─── תיבות הערה ─── */
.note {
    border: 1px solid var(--line);
    border-inline-start: 3px solid var(--brand);
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 1rem 1.2rem;
    margin: 1.3rem 0;
}

.note > :last-child {
    margin-bottom: 0;
}

.note-title {
    display: block;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.note.tip {
    border-inline-start-color: var(--brand);
}

.note.warn {
    background: var(--warn-bg);
    border-color: var(--warn-line);
    border-inline-start-color: #d9a227;
}

.note.warn .note-title {
    color: var(--warn-ink);
}

/* ─── טבלאות ─── */
.table-wrap {
    overflow-x: auto;
    margin: 1.3rem 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 460px;
    font-size: 0.95rem;
}

th,
td {
    text-align: start;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    background: var(--brand-tint);
    color: var(--ink);
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

tbody tr:last-child td {
    border-bottom: 0;
}

/* ─── placeholder לצילום מסך ─── */
figure[data-screenshot] {
    margin: 1.6rem 0;
    border: 2px dashed var(--line-strong);
    border-radius: var(--radius);
    background: repeating-linear-gradient(
        45deg,
        var(--brand-tint),
        var(--brand-tint) 10px,
        #eef6f3 10px,
        #eef6f3 20px
    );
    padding: 2.6rem 1.2rem;
    text-align: center;
}

figure[data-screenshot]::before {
    content: '📷 ' attr(data-screenshot);
    display: block;
    color: var(--brand-strong);
    font-weight: 600;
    font-size: 0.95rem;
    opacity: 0.75;
}

figure[data-screenshot] figcaption {
    margin-top: 0.5rem;
    font-size: 0.88rem;
    color: var(--muted);
}

figure[data-screenshot]:has(img) {
    border-style: solid;
    border-color: var(--line);
    background: var(--surface);
    padding: 0.5rem;
}

figure[data-screenshot]:has(img)::before {
    display: none;
}

figure[data-screenshot] img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    display: block;
}

/* ─── כרטיסים ─── */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
    margin: 1.4rem 0;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.2rem 1.3rem;
}

.card h4 {
    margin-top: 0;
    color: var(--brand-strong);
}

.card p:last-child {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* ─── תחתית ─── */
.site-footer {
    background: var(--ink);
    color: #a9bcb6;
    padding: 2.5rem 1.5rem;
    font-size: 0.93rem;
}

.site-footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
}

.site-footer a {
    color: #7fd3ba;
}

/* ═══ דף הנחיתה ═══ */
.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hero {
    background:
        radial-gradient(ellipse 80% 60% at 70% 0%, #e4f4ee 0%, transparent 60%),
        var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 4.5rem 0 4rem;
}

.hero-inner {
    max-width: 780px;
}

.eyebrow {
    display: inline-block;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.85rem;
    border-radius: 100px;
    margin-bottom: 1.2rem;
}

.hero h1 {
    font-size: clamp(2.1rem, 5.2vw, 3.4rem);
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.hero h1 em {
    font-style: normal;
    color: var(--brand);
}

.hero p.lead {
    font-size: clamp(1.08rem, 2.2vw, 1.25rem);
    color: var(--body);
    max-width: 60ch;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
}

.hero-note {
    margin: 1.6rem 0 0;
    font-size: 0.93rem;
    color: var(--muted);
}

section.band {
    padding: 4rem 0;
    border-bottom: 1px solid var(--line);
}

section.band.alt {
    background: var(--surface);
}

.band-head {
    max-width: 62ch;
    margin-bottom: 2.4rem;
}

.band-head h2 {
    font-size: clamp(1.6rem, 3.4vw, 2.15rem);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.band-head p {
    font-size: 1.06rem;
    margin: 0;
}

/* 300px ולא 260: כך נופלים לשלוש עמודות ושישה היתרונות מתחלקים 3+3 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.4rem;
}

.feature {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem;
    box-shadow: var(--shadow);
}

section.band.alt .feature {
    background: var(--brand-tint);
    box-shadow: none;
}

.feature-icon {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 0.9rem;
}

.feature h3 {
    font-size: 1.15rem;
    margin: 0 0 0.4rem;
    color: var(--ink);
}

.feature p {
    margin: 0;
    font-size: 0.98rem;
}

/* שלבי "איך זה עובד" */
ol.flow {
    list-style: none;
    counter-reset: flow;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.2rem;
}

ol.flow > li {
    counter-increment: flow;
    position: relative;
    padding-inline-start: 3.6rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--line);
}

ol.flow > li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

ol.flow > li::before {
    content: counter(flow);
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-variant-numeric: tabular-nums;
}

ol.flow h3 {
    font-size: 1.12rem;
    margin: 0.2rem 0 0.3rem;
    color: var(--ink);
}

ol.flow p {
    margin: 0;
    font-size: 0.99rem;
}

/* רשימת מודולים */
/* 250px ולא 200: ארבע עמודות, ושנים־עשר המודולים מתחלקים לשלוש שורות מלאות */
.module-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.8rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.module-list li {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1.1rem;
    font-size: 0.97rem;
}

.module-list strong {
    display: block;
    margin-bottom: 0.15rem;
}

.module-list span {
    color: var(--muted);
    font-size: 0.9rem;
}

/* קריאה לפעולה מסכמת */
.cta {
    background: var(--brand-strong);
    color: #d8ece5;
    padding: 3.6rem 0;
    text-align: center;
}

.cta h2 {
    color: #fff;
    font-size: clamp(1.6rem, 3.4vw, 2.1rem);
    margin-bottom: 0.6rem;
}

.cta p {
    max-width: 52ch;
    margin: 0 auto 1.8rem;
}

.cta .btn-primary {
    background: #fff;
    color: var(--brand-strong);
}

.cta .btn-primary:hover {
    background: #e8f5f0;
    color: var(--brand-strong);
}

.cta .btn-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
}

.cta .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
}

/* ─── מובייל ─── */
@media (max-width: 900px) {
    body {
        font-size: 16px;
    }

    .layout {
        grid-template-columns: 1fr;
        gap: 0;
        padding-inline: 1.1rem;
    }

    .toc {
        position: static;
        max-height: none;
        overflow: visible;
        padding: 1rem 0 0;
        border-bottom: 1px solid var(--line);
    }

    .toc-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        background: var(--surface);
        border: 1px solid var(--line-strong);
        border-radius: var(--radius-sm);
        padding: 0.7rem 1rem;
        font: inherit;
        font-weight: 600;
        color: var(--ink);
        cursor: pointer;
    }

    .toc-toggle::after {
        content: '▾';
        color: var(--brand);
        transition: transform 0.2s;
    }

    .toc-toggle[aria-expanded='true']::after {
        transform: rotate(180deg);
    }

    .toc-panel {
        margin-top: 0.6rem;
        padding-bottom: 0.6rem;
    }

    .toc-panel[hidden] {
        display: none;
    }

    .topbar-links {
        gap: 0.8rem;
        font-size: 0.9rem;
    }

    .topbar-links .hide-sm {
        display: none;
    }

    .brand span {
        display: none;
    }

    section.chapter > h2 {
        font-size: 1.45rem;
    }

    ol.steps > li {
        padding-inline-start: 2.3rem;
    }

    .wrap {
        padding-inline: 1.1rem;
    }

    .hero {
        padding: 3rem 0 2.6rem;
    }

    section.band {
        padding: 2.8rem 0;
    }

    .hero-actions .btn,
    .cta-actions .btn {
        flex: 1 1 100%;
    }

    ol.flow > li {
        padding-inline-start: 3.1rem;
    }

    ol.flow > li::before {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 0.95rem;
    }

    /*
       הטבלאות כאן דו-עמודתיות, ולכן עדיף שיגלשו לשורות מאשר שייגללו
       אופקית ויחתכו טקסט באמצע מילה.
    */
    table {
        min-width: 0;
        font-size: 0.92rem;
    }

    th {
        white-space: normal;
    }

    th,
    td {
        padding: 0.6rem 0.75rem;
    }
}

@media print {
    .topbar,
    .toc,
    .site-footer {
        display: none;
    }

    .layout {
        display: block;
    }
}
