@font-face {
    font-family: "MKR Vazir";
    src: url("fonts/vazirmatn.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
    unicode-range: U+0600-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
    font-family: "MKR Vazir";
    src: url("fonts/vazirmatn-bold.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
    unicode-range: U+0600-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
    font-family: "MKR Vazir";
    src: url("fonts/vazirmatn-latin.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
    unicode-range: U+0000-024F, U+2000-200B, U+2010-206F, U+20A0-20CF, U+2190-2199;
}
@font-face {
    font-family: "MKR Vazir";
    src: url("fonts/vazirmatn-latin-bold.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
    unicode-range: U+0000-024F, U+2000-200B, U+2010-206F, U+20A0-20CF, U+2190-2199;
}
@font-face {
    font-family: "MKR Naskh";
    src: url("fonts/noto-naskh-arabic-bold.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
    unicode-range: U+0600-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
    font-family: "MKR Noto";
    src: url("fonts/NotoSansArabic-Regular.ttf") format("truetype");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "MKR Noto";
    src: url("fonts/NotoSansArabic-Bold.ttf") format("truetype");
    font-weight: 700;
    font-display: swap;
}
body:has([data-mkr-builder]) .kc-main:has([data-mkr-builder]) {
    width: min(97%, 1390px);
    max-width: 1390px;
}
.kc-paper:has([data-mkr-builder]) > .kc-page-heading { margin-block-end: 18px; }
.mkr {
    --mkr-ink: #153431;
    --mkr-muted: #4d6460;
    --mkr-accent: #126b60;
    --mkr-border: #d8e5e2;
    --mkr-surface: #f3f7f6;
    box-sizing: border-box;
    direction: rtl;
    text-align: right;
    color: var(--mkr-ink);
    font: 400 14px/1.75 "MKR Vazir", "MKR Noto", Tahoma, sans-serif;
    min-width: 0;
    margin-block: 12px 24px;
}
.mkr *, .mkr *::before, .mkr *::after { box-sizing: border-box; }
.mkr [hidden] { display: none !important; }
.mkr :is(h2,h3,p) { margin: 0; color: inherit; }
.mkr :is(button,input,select,textarea) { font: inherit; }
.mkr :is(button,input,select,textarea,summary):focus-visible {
    outline: 2px solid #168177;
    outline-offset: 3px;
}
.mkr button { cursor: pointer; }
.mkr button:disabled { cursor: default; opacity: .46; }
.mkr-intro {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    padding: clamp(22px, 4vw, 44px);
    margin-block-end: 23px;
    border-radius: 18px;
    background: linear-gradient(115deg, #0e3834, #14594f);
    color: #fff;
}
.mkr-intro .mkr-kicker {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #e5f7f1;
    font-size: 12px;
    font-weight: 700;
}
.mkr-kicker span { width: 8px; height: 8px; border-radius: 50%; background: #eeb65f; }
.mkr-intro h2 { font-size: clamp(23px, 3.2vw, 37px); line-height: 1.42; margin-block: 8px; }
.mkr .mkr-intro p { margin: 0; }
.mkr-intro p:last-child { color: #e5f7f1; }
.mkr-formats {
    background: #ffffff17;
    border: 1px solid #ffffff45;
    border-radius: 99px;
    padding: 4px 12px;
    font: 700 12px/1.6 Arial, sans-serif;
    white-space: nowrap;
}
.mkr-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, .94fr); gap: 22px; align-items: start; }
.mkr-edit, .mkr-preview, .mkr-form { min-width: 0; }
.mkr-section {
    margin-block-end: 9px;
    border: 1px solid var(--mkr-border);
    border-radius: 12px;
    background: #fff;
}
.mkr-section > summary {
    position: relative;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 48px;
    padding: 10px 16px 10px 37px;
    cursor: pointer;
    font-weight: 700;
    border-radius: 12px;
}
.mkr-section > summary::-webkit-details-marker { display: none; }
.mkr-section > summary::after {
    content: "";
    position: absolute;
    inset-inline-end: 16px;
    width: 8px;
    height: 8px;
    border-inline-end: 2px solid var(--mkr-accent);
    border-block-end: 2px solid var(--mkr-accent);
    transform: rotate(45deg);
}
.mkr-section[open] > summary::after { transform: rotate(225deg); }
.mkr-section[open] > summary { background: #f0f7f5; border-radius: 11px 11px 0 0; }
.mkr-section summary small { color: var(--mkr-muted); font-weight: 400; font-size: 11px; white-space: nowrap; }
.mkr-section-body { padding: 15px; }
.mkr-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mkr-span { grid-column: 1/-1; }
.mkr-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 12px; font-weight: 700; }
.mkr-field small { margin-inline-start: 4px; color: var(--mkr-accent); font-size: 10px; }
.mkr-field :is(input,select,textarea) {
    display: block;
    max-width: 100%;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 7px 9px;
    border: 1px solid #c9dad6;
    border-radius: 7px;
    background: #fff;
    color: var(--mkr-ink);
    font-size: 13px;
    font-weight: 400;
}
.mkr-field [dir="auto"]::placeholder { direction: rtl; text-align: right; }
.mkr-field :is(input,textarea)::placeholder { color: #596f6a; opacity: 1; }
.mkr-field input:disabled { background: #eff4f3; }
.mkr-field input[aria-invalid="true"] { border-color: #a33a50; }
.mkr-field textarea { resize: vertical; }
.mkr-photo { margin-top: 13px; }
.mkr-photo strong { display: block; font-size: 12px; margin-block-end: 5px; }
.mkr-photo button { margin-inline-end: 6px; }
.mkr-photo-message { display: block; margin-top: 3px; color: var(--mkr-muted); }
.mkr .mkr-template-hint {
    margin: 0;
    padding: 9px 11px;
    background: var(--mkr-surface);
    border-inline-start: 3px solid var(--mkr-accent);
    border-radius: 6px;
    color: var(--mkr-muted);
    font-size: 12px;
}
.mkr-palette { border: 0; margin: 10px 0; padding: 0; }
.mkr-palette legend { margin-block-end: 5px; font-size: 12px; font-weight: 700; }
.mkr-swatch { position: relative; display: inline-flex; align-items: center; margin-inline-end: 8px; cursor: pointer; }
.mkr-swatch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.mkr-swatch span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--swatch); }
.mkr-swatch input:checked + span::after { content: "✓"; color: #fff; font: bold 15px Arial, sans-serif; }
.mkr-swatch input:focus-visible + span { outline: 2px solid #168177; outline-offset: 3px; }
.mkr-check, .mkr-draft label { display: flex; align-items: center; gap: 7px; }
.mkr input[type="checkbox"] { appearance: auto; accent-color: var(--mkr-accent); width: 16px; height: 16px; margin: 0; flex: none; }
.mkr-entry { border: 1px solid var(--mkr-border); border-radius: 9px; padding: 10px; margin-block-end: 10px; }
.mkr-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-block-end: 8px; min-width: 0; }
.mkr-entry-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkr-entry-actions { display: flex; flex: none; align-items: center; }
.mkr button.mkr-link { border: 0; padding: 4px 7px; background: transparent; color: var(--mkr-accent); font-weight: 700; border-radius: 5px; }
.mkr button.mkr-link:hover:not(:disabled) { background: #e5f1ed; }
.mkr-draft { display: grid; gap: 5px; margin-block-start: 15px; color: var(--mkr-muted); font-size: 12px; justify-items: start; }
.mkr-preview {
    background: var(--mkr-surface);
    border: 1px solid var(--mkr-border);
    border-radius: 14px;
    padding: clamp(11px, 2vw, 21px);
}
.mkr-preview-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 37px; margin-bottom: 10px; }
.mkr-preview-head > div:first-child { flex: 1 1 140px; }
.mkr button[data-mkr-choose-template] { white-space: nowrap; }
.mkr-preview-head h3 { font-size: 16px; line-height: 1.4; }
.mkr-preview-head span { color: var(--mkr-muted); font-size: 11px; }
.mkr-page-controls { display: flex; align-items: center; gap: 6px; }
.mkr button[data-mkr-prev], .mkr button[data-mkr-next] {
    display: grid;
    place-content: center;
    background: #fff;
    border: 1px solid var(--mkr-border);
    width: 31px;
    height: 32px;
    border-radius: 7px;
    color: var(--mkr-ink);
    font: 700 22px/1 Arial, sans-serif;
}
.mkr-sheet { margin-inline: auto; max-width: 600px; background: #fff; box-shadow: 0 8px 22px #12393419; aspect-ratio: 794/1123; }
.mkr-sheet canvas { display: block; width: 100%; height: auto; }
.mkr-download { display: flex; gap: 8px; flex-wrap: wrap; margin-block-start: 9px; }
.mkr button.mkr-primary, .mkr button.mkr-outline {
    min-height: 42px;
    padding: 7px 12px;
    border: 1px solid var(--mkr-accent);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
}
.mkr-download button { flex: 1 0 auto; }
.mkr button.mkr-primary { background: var(--mkr-accent); color: white; }
.mkr button.mkr-primary:hover:not(:disabled) { background: #0d554b; }
.mkr button.mkr-outline { background: white; color: var(--mkr-accent); }
.mkr button.mkr-outline:hover:not(:disabled) { background: #e7f3ef; }
.mkr .mkr-status { margin-block: 5px 7px; min-height: 20px; color: var(--mkr-muted); font-size: 12px; }
.mkr a.mkr-jump { display: none; color: var(--mkr-accent); font-weight: 700; }
.mkr-edit, .mkr-preview { scroll-margin-top: 18px; }
@media (max-width: 880px) {
    .mkr a.mkr-jump { display: inline-block; margin-block: 4px 12px; }
    .mkr-preview a.mkr-jump { margin-block: 9px 0; }
    .mkr-workspace { grid-template-columns: minmax(0, 1fr); gap: 17px; }
}
@media (max-width: 550px) {
    body:has([data-mkr-builder]) .kc-main:has([data-mkr-builder]) { width: 100%; padding-inline: 10px; }
    .kc-paper:has([data-mkr-builder]) { padding-inline: 12px; }
    .mkr-intro { align-items: start; flex-direction: column; gap: 12px; }
    .mkr-section > summary { padding-inline-start: 11px; }
    .mkr-section-body { padding: 10px; }
    .mkr-fields { grid-template-columns: minmax(0, 1fr); gap: 9px; }
    .mkr-field :is(input,select,textarea) { font-size: 16px; }
    .mkr-section summary small { font-size: 10px; }
}
