@font-face {
    font-family: Estedad;
    src: url('/assets/css/fonts/estedad/Estedad-FD-Regular.woff2') format('woff2');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: Estedad;
    src: url('/assets/css/fonts/estedad/Estedad-FD-Medium.woff2') format('woff2');
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: Estedad;
    src: url('/assets/css/fonts/estedad/Estedad-FD-Bold.woff2') format('woff2');
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: Estedad;
    src: url('/assets/css/fonts/estedad/Estedad-FD-ExtraBold.woff2') format('woff2');
    font-style: normal;
    font-weight: 800;
    font-display: swap;
}

:root {
    color-scheme: light;
    --ink: #202c43;
    --muted: #627089;
    --blue: #315de7;
    --blue-dark: #264ac1;
    --line: #e4e9f1;
    --canvas: #fafbfd;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 105px; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 400 14px/2.05 Estedad, Tahoma, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--blue-dark); text-decoration: none; text-underline-offset: 5px; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #6587ff; outline-offset: 5px; border-radius: 5px; }
::selection { background: #dce5ff; color: #18336e; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure { margin: 0; }
h2 { font-size: 24px; line-height: 1.8; font-weight: 800; letter-spacing: -.6px; }
h3 { font-size: 16px; line-height: 1.9; font-weight: 700; }
strong { font-weight: 700; }
code { display: inline; direction: ltr; unicode-bidi: isolate; font: 12px/1.8 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #304b89; background: #eff3fa; padding: 2px 5px; border-radius: 5px; overflow-wrap: anywhere; }
.site-header { position: sticky; top: 0; z-index: 20; background: #ffffffed; border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.header-inner { max-width: 1440px; min-height: 78px; padding: 0 40px; margin: auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand, .header-links { display: flex; align-items: center; gap: 22px; }
.brand { color: var(--ink); font-weight: 500; font-size: 13px; }
.brand img { object-fit: contain; }
.brand-divider { height: 23px; width: 1px; background: #d9dfeb; }
.reference-link { display: flex; align-items: center; gap: 14px; font-size: 12px; font-weight: 700; color: #36445d; }
.reference-link span { font: 11px/1.5 ui-monospace, monospace; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; }
.version { direction: ltr; display: flex; gap: 7px; align-items: center; font: 11px/1.5 ui-monospace, monospace; color: #4b596d; }
.version i { width: 6px; height: 6px; background: #2d9d7c; border-radius: 50%; box-shadow: 0 0 0 4px #e5f5ef; }
.docs-layout { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 60px; max-width: 1440px; margin: 0 auto; padding: 0 40px; }
.sidebar { position: sticky; top: 79px; height: calc(100dvh - 79px); overflow-y: auto; padding: 35px 0; scrollbar-width: thin; }
.sidebar-title { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 14px; font-weight: 700; }
.sidebar-icon { display: grid; place-items: center; width: 32px; height: 32px; background: white; border: 1px solid var(--line); border-radius: 9px; font: 20px/1 sans-serif; color: var(--blue); }
.nav-label { color: #768198; font-size: 10px; margin: 30px 12px 12px; }
.toc { display: flex; flex-direction: column; gap: 5px; }
.toc a { display: flex; align-items: center; gap: 12px; min-height: 41px; padding: 7px 12px; border-radius: 8px; font-size: 12px; color: #5c6980; border: 1px solid transparent; transition: background .15s, color .15s; }
.toc a span { font-size: 10px; color: #8190a6; }
.toc a:hover { background: #f0f3f9; text-decoration: none; }
.toc a[aria-current] { background: #eaf0ff; border-color: #e1e8fc; color: var(--blue-dark); font-weight: 700; }
.toc a[aria-current] span { color: var(--blue); }
.sidebar-card { margin: 32px 0 0; padding: 20px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.sidebar-card p { font-size: 11px; color: var(--muted); margin: 10px 0 12px; }
.sidebar-card a { display: block; font-size: 11px; font-weight: 700; }
.sidebar-card a.schema-link { color: var(--muted); font: 10px/2 ui-monospace, monospace; margin-top: 10px; text-align: right; }
.main-content { min-width: 0; padding-bottom: 24px; }
.doc-section { padding: 48px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 18px; }
.doc-section > p { margin: 18px 0; color: #4c5b72; }
.doc-section > p:last-child { margin-bottom: 0; }
.doc-section > h3 { margin-top: 30px; }
.hero { padding-top: 34px; }
.breadcrumb { color: #7a8598; font-size: 10px; margin-bottom: 42px; }
.breadcrumb span { padding: 0 10px; color: #b6bfcd; }
.hero-topline { display: flex; align-items: center; gap: 15px; margin-bottom: 21px; }
.eyebrow { font-size: 10px; font-weight: 700; color: var(--blue); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 2px 9px; border: 1px solid var(--line); border-radius: 6px; font-size: 10px; color: #67758c; background: white; }
.pill span { color: #bdc5d3; }
h1 { font-size: clamp(32px, 3.2vw, 47px); font-weight: 800; line-height: 1.7; letter-spacing: -1.7px; }
h1 > span { color: var(--blue); }
.hero p.hero-description { max-width: 720px; margin: 22px 0 26px; color: #617089; font-size: 15px; line-height: 2.25; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 22px; min-height: 44px; border: 1px solid transparent; padding: 9px 20px; border-radius: 9px; font-size: 12px; font-weight: 700; transition: background .15s; }
.button:hover { text-decoration: none; }
.button-primary { background: var(--blue); color: white; box-shadow: 0 4px 9px #315de71a; }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { background: white; color: #47546b; border-color: #dfe5ee; }
.button-secondary:hover { background: #f0f4fc; }
.journey { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 36px 0 24px; background: white; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.journey a { padding: 20px 16px; position: relative; color: var(--ink); }
.journey a + a { border-inline-start: 1px solid var(--line); }
.journey a:hover { background: #f4f7ff; text-decoration: none; }
.journey-number { color: var(--blue); font-size: 12px; display: block; margin-bottom: 12px; }
.journey strong { display: block; font-size: 12px; }
.journey small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.callout { display: flex; align-items: flex-start; gap: 13px; border: 1px solid; border-radius: 11px; padding: 20px; margin: 24px 0 0; font-size: 12px; }
.callout p { margin-top: 5px; line-height: 2.2; }
.callout strong { font-size: 13px; }
.callout-blue { background: #eef4ff; border-color: #dce7fc; color: #3d5680; }
.callout-amber { background: #fffaef; border-color: #eee2c7; color: #735c30; }
.callout-symbol { flex-shrink: 0; display: grid; place-items: center; margin-top: 4px; width: 19px; height: 19px; border: 1.5px solid currentColor; border-radius: 50%; font: 700 12px/1 Georgia, serif; }
.section-heading { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.section-number { display: grid; place-items: center; flex-shrink: 0; margin-top: 5px; width: 36px; height: 36px; border: 1px solid #dfe6f2; border-radius: 10px; background: white; color: #677caa; font-size: 12px; }
.section-heading .eyebrow { display: block; margin-bottom: 5px; color: #6d7e9c; }
.card-grid { display: grid; gap: 14px; margin: 24px 0; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.info-card { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.info-card p { color: #65718a; font-size: 12px; margin-top: 9px; line-height: 2.2; }
.card-kicker { display: block; font-size: 10px; color: var(--blue); margin-bottom: 10px; font-weight: 500; }
.card-kicker[lang="en"] { font: 10px/1.5 ui-monospace, monospace; letter-spacing: 1px; text-align: right; }
.three-columns .info-card { padding: 20px; }
.recommended-card { background: #f0f5ff; border-color: #d1defb; }
.recommended-card h3 { color: #3158bb; }
.code-block { overflow: hidden; margin: 24px 0; border-radius: 12px; border: 1px solid #273650; background: #172237; color: #e7efff; }
.code-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 47px; padding: 9px 19px; border-bottom: 1px solid #2d3a52; background: #1f2c42; font-size: 11px; color: #bfcee4; }
.code-heading button { font-size: 10px; line-height: 1.6; padding: 5px 12px; color: #dee8fc; border: 1px solid #4a5b77; background: #2a3952; border-radius: 6px; white-space: nowrap; }
.code-heading button:hover { background: #3b4d6c; }
pre { margin: 0; padding: 23px; overflow-x: auto; tab-size: 2; text-align: left; }
pre code { color: #d9e7ff; background: none; padding: 0; font-size: 12px; line-height: 2; border-radius: 0; overflow-wrap: normal; unicode-bidi: normal; }
.doc-section p.small-note, .small-note { font-size: 11px; color: #6e7d94; line-height: 2.1; }
.room-model { background: linear-gradient(120deg, #f4f7ff, #fff); border: 1px solid var(--line); border-radius: 12px; padding: 24px; margin: 24px 0; display: grid; grid-template-columns: 1fr 1.8fr; gap: 30px; align-items: center; }
.room-model-parent { display: flex; flex-direction: column; gap: 4px; }
.room-model-parent > span { text-align: right; font: 11px/1.8 ui-monospace, monospace; color: var(--blue); }
.room-model-parent strong { font-size: 14px; }
.room-model small { color: var(--muted); font-size: 10px; }
.room-model-children { position: relative; display: flex; flex-direction: column; gap: 8px; padding-inline-start: 22px; border-inline-start: 1px dashed #9cafdc; }
.room-model-children > div { position: relative; display: flex; justify-content: space-between; gap: 10px; background: white; padding: 8px 14px; border: 1px solid #e0e6f3; border-radius: 7px; font-size: 11px; }
.room-model-children > div::before { content: ''; position: absolute; inset-inline-start: -23px; top: 50%; width: 22px; border-top: 1px dashed #9cafdc; }
.sequence { margin: 28px 0; background: white; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.sequence-heading { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.sequence-heading h3 { font-size: 13px; }
.diagram-label { font: 9px/1.5 ui-monospace, monospace; letter-spacing: 1.3px; color: #7183a1; order: 2; }
.diagram-scroll { overflow-x: auto; padding: 16px 12px 0; background-image: radial-gradient(#e0e7f1 .7px, transparent .7px); background-size: 16px 16px; }
.sequence-svg { display: block; width: 100%; min-width: 740px; height: auto; font-family: Estedad, Tahoma, sans-serif; color: #3d68ce; }
.lifeline { stroke: #c7d2e6; stroke-width: 1.5; stroke-dasharray: 5 6; }
.actor-box { fill: #f2f5fd; stroke: #d7e0f2; }
.actor-text { fill: #314b79; font-size: 15px; font-weight: 700; text-anchor: middle; }
.step-text { fill: #455a7c; font-size: 13px; text-anchor: middle; paint-order: stroke; stroke: white; stroke-width: 6px; stroke-linejoin: round; }
.sequence-request line { stroke: #3d68ce; stroke-width: 1.8; }
.sequence-response line { stroke: #3d68ce; stroke-width: 1.5; stroke-dasharray: 6 5; }
.sequence-request circle, .sequence-response circle { fill: #3d68ce; }
.sequence figcaption { border-top: 1px solid var(--line); padding: 13px 22px; font-size: 11px; color: #6a7891; background: #fcfdff; }
.detail-list { padding-inline-start: 22px; margin: 22px 0 0; color: #536179; }
.detail-list li { padding-inline-start: 5px; margin: 10px 0; font-size: 13px; }
.detail-list li::marker { color: #7f9ad6; }
.access-badge { display: inline-block; font-size: 10px; border-radius: 5px; padding: 2px 8px; background: #f0f2f6; color: #606f84; margin-bottom: 13px; }
.open-card { background: #f7fcfa; border-color: #d9eae4; }
.open-card .access-badge { background: #e8f4ef; color: #337962; }
.access-cards h3 code { font-size: 11px; font-weight: 400; }
.card-bottom { border-top: 1px solid var(--line); padding-top: 13px; margin-top: 18px; font-size: 10px; color: #758298; }
.table-scroll { margin: 24px 0; overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: 11px; }
table { border-collapse: collapse; width: 100%; text-align: right; font-size: 12px; }
th { background: #f1f4f9; font-size: 11px; color: #5e6e87; font-weight: 500; white-space: nowrap; }
td, th { padding: 14px 17px; vertical-align: top; }
td { border-top: 1px solid var(--line); color: #546179; min-width: 125px; }
td code { font-size: 11px; }
.numbered-steps { counter-reset: guide-step; list-style: none; margin: 25px 0; padding: 0; }
.numbered-steps li { counter-increment: guide-step; position: relative; padding: 0 46px 24px 0; }
.numbered-steps li:last-child { padding-bottom: 0; }
.numbered-steps li::before { content: counter(guide-step, persian); position: absolute; right: 0; top: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-size: 11px; color: #3b61bc; border: 1px solid #dce4f6; background: #f0f4fd; }
.numbered-steps li:not(:last-child)::after { content: ''; position: absolute; right: 14px; top: 35px; bottom: 7px; width: 1px; background: #dfe6f2; }
.numbered-steps strong { font-size: 13px; }
.numbered-steps p { font-size: 12px; color: #62718b; margin-top: 5px; }
.reference-banner { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 27px; margin-top: 30px; border: 1px solid #cfdcf8; border-radius: 12px; background: linear-gradient(110deg, #e6eeff, #f7f9ff); color: #2c4a88; }
.reference-banner:hover { text-decoration: none; background: #eaf0ff; }
.reference-banner > div { display: flex; flex-direction: column; gap: 7px; }
.reference-banner .eyebrow { text-align: right; font: 10px/1.8 ui-monospace, monospace; letter-spacing: .8px; }
.reference-banner strong { font-size: 17px; }
.reference-banner div > span:last-child { color: #697fa9; font-size: 11px; }
.banner-arrow { display: grid; place-items: center; flex-shrink: 0; height: 44px; width: 44px; background: white; border: 1px solid #d0defb; border-radius: 11px; font-size: 22px; }
.docs-footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 24px 0; font-size: 10px; color: #76859e; }
.docs-footer span span { color: #b0bdce; margin: 0 8px; }
.docs-footer a { font: 10px/2 ui-monospace, monospace; color: #6c7f9e; }
.skip-link { position: fixed; top: -100px; right: 20px; z-index: 50; background: var(--blue); color: white; padding: 12px 20px; border-radius: 7px; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (min-width: 1500px) {
    .docs-layout { gap: 80px; }
}

@media (max-width: 1150px) {
    .docs-layout { grid-template-columns: 198px minmax(0, 1fr); gap: 30px; padding: 0 28px; }
    .header-inner { padding: 0 28px; }
    .toc a { font-size: 11px; gap: 8px; }
    .three-columns { grid-template-columns: 1fr; }
    .journey { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .journey a:nth-child(3) { border-inline-start: 0; }
    .journey a:nth-child(n+3) { border-top: 1px solid var(--line); }
    h2 { font-size: 21px; }
}

@media (max-width: 850px) {
    html { scroll-padding-top: 85px; }
    .header-inner { min-height: 66px; padding: 0 22px; }
    .docs-layout { display: block; padding: 0 22px; }
    .sidebar { position: static; height: auto; overflow: visible; padding: 24px 0 0; }
    .sidebar-title, .nav-label, .sidebar-card { display: none; }
    .toc { flex-direction: row; overflow-x: auto; padding: 0 0 10px; gap: 7px; scrollbar-width: thin; }
    .toc a { flex-shrink: 0; white-space: nowrap; background: white; border-color: var(--line); min-height: 38px; }
    .hero { padding-top: 20px; }
    .breadcrumb { margin-bottom: 30px; }
    .doc-section { padding-bottom: 35px; }
    .three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    body { font-size: 13px; }
    .header-inner { padding: 0 18px; }
    .brand { gap: 10px; }
    .brand img { width: 28px; height: 28px; }
    .brand > span:last-child { font-size: 10px; }
    .brand-divider { height: 18px; }
    .header-links { gap: 0; }
    .version { display: none; }
    .reference-link { font-size: 10px; gap: 7px; }
    .reference-link span { font-size: 9px; }
    .docs-layout { padding: 0 18px; }
    .breadcrumb { font-size: 9px; }
    .breadcrumb span { padding: 0 4px; }
    h1 { font-size: 31px; line-height: 1.85; letter-spacing: -1px; }
    .hero p.hero-description { font-size: 13px; }
    .hero-actions { gap: 8px; }
    .button { font-size: 11px; gap: 12px; padding: 9px 14px; }
    .journey { margin-top: 28px; }
    .journey a { padding: 17px 13px; }
    .journey strong { font-size: 11px; }
    .journey small { font-size: 9px; }
    .callout { padding: 16px 13px; gap: 10px; }
    .callout p { font-size: 11px; }
    .callout strong { font-size: 12px; }
    .doc-section { padding-top: 35px; }
    .hero { padding-top: 18px; }
    .section-heading { gap: 11px; margin-bottom: 20px; }
    .section-number { width: 29px; height: 29px; font-size: 10px; border-radius: 8px; }
    h2 { font-size: 19px; line-height: 1.9; letter-spacing: -.5px; }
    .two-columns, .three-columns { grid-template-columns: 1fr; }
    .info-card, .three-columns .info-card { padding: 20px; }
    .room-model { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
    .room-model-children { margin-inline-start: 8px; }
    .room-model-children > div { flex-wrap: wrap; gap: 2px 10px; }
    .room-model-children small { font-size: 9px; }
    .code-heading { padding: 9px 13px; font-size: 10px; }
    pre { padding: 18px; }
    pre code { font-size: 11px; }
    .sequence-heading { padding: 16px; }
    .sequence-heading h3 { font-size: 12px; }
    .diagram-label { font-size: 8px; }
    .sequence figcaption { padding: 12px 16px; font-size: 10px; }
    .diagram-scroll::before { content: 'برای مشاهدهٔ کامل نمودار، افقی پیمایش کنید ←'; display: block; font-size: 9px; color: #687e9e; margin: 0 5px 8px; }
    td, th { padding: 12px; }
    table { font-size: 11px; }
    .detail-list li { font-size: 12px; }
    .reference-banner { padding: 20px; gap: 12px; }
    .reference-banner strong { font-size: 14px; }
    .reference-banner .eyebrow { font-size: 8px; }
    .banner-arrow { width: 34px; height: 34px; font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}

@media print {
    body { background: white; font-size: 11px; }
    .site-header, .sidebar, .hero-actions, .code-heading button, .skip-link { display: none !important; }
    .docs-layout { display: block; max-width: none; padding: 0; }
    .doc-section { padding: 25px 0; }
    .sequence, .info-card, .callout, .code-block { break-inside: avoid; }
    .diagram-scroll, .table-scroll, pre { overflow: visible; }
    .sequence-svg { min-width: 0; }
    .diagram-scroll::before { display: none; }
    pre { white-space: pre-wrap; overflow-wrap: anywhere; }
    .code-block, .code-heading { background: #f5f6f9; color: #253653; border-color: #d0d6e0; }
    pre code { color: #253653; }
    h1 { font-size: 32px; }
}
