/**
 * B.H. Copyright (c) 2026 Yemot HaMashiach Ltd.
 * All Rights Reserved.
 *
 * This software is the confidential and proprietary information of
 * Yemot HaMashiach Ltd. ("Confidential Information"). You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Yemot HaMashiach Ltd.
 *
 * Unauthorized copying of this file, via any medium, is strictly prohibited.
 */

/* =========================================================
   Design tokens — calm, neutral, single accent
   ========================================================= */
:root {
    --bg: #ffffff;
    --bg-soft: #fbfbfc;
    --surface: #ffffff;
    --surface-2: #f5f5f7;
    --surface-3: #ededf0;
    --border: #e8e8ec;
    --border-2: #dbdbe1;
    --text: #191a1f;
    --text-2: #565761;
    --text-3: #8c8d97;
    --accent: #3155e6;
    --accent-2: #2442c7;
    --accent-soft: #eef1fe;
    --danger: #d02b2b;
    --danger-soft: #fceded;
    --warn: #a56206;
    --warn-soft: #fbf3e2;
    --ok: #157a44;
    --ok-soft: #e9f6ee;
    --code-bg: #14161c;
    --code-bg-2: #1c1f27;
    --code-text: #e7e8ee;
    --shadow-xs: 0 1px 2px rgba(20,22,30,.05);
    --shadow-sm: 0 1px 3px rgba(20,22,30,.06);
    --shadow-md: 0 8px 24px -6px rgba(20,22,30,.12);
    --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
    --radius-lg: 14px;
    --radius: 10px;
    --radius-sm: 7px;
    --topbar-h: 60px;
    --sidebar-w: 350px;
    --toc-w: 220px;
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --font: "Assistant", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}
[data-theme="dark"] {
    --bg: #0b0c0f;
    --bg-soft: #0e0f13;
    --surface: #131419;
    --surface-2: #1a1c22;
    --surface-3: #23252d;
    --border: #262830;
    --border-2: #34363f;
    --text: #ecedf1;
    --text-2: #a3a5ae;
    --text-3: #6f717b;
    --accent: #7f9cff;
    --accent-2: #97afff;
    --accent-soft: #171d33;
    --danger: #f2807f;
    --danger-soft: #2c1719;
    --warn: #e0aa4e;
    --warn-soft: #2b2210;
    --ok: #5cc98a;
    --ok-soft: #12271b;
    --code-bg: #08090c;
    --code-bg-2: #101218;
    --code-text: #dcdee6;
    --shadow-xs: 0 1px 2px rgba(0,0,0,.5);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.5);
    --shadow-md: 0 10px 28px -8px rgba(0,0,0,.7);
}

/* Per-product accent (module = teal). Reinforces that the two products are separate. */
body.product-module { --accent: #0d9488; --accent-2: #0b7c6f; --accent-soft: #e2f3f0; }
[data-theme="dark"] body.product-module { --accent: #4fd1c5; --accent-2: #6fe0d6; --accent-soft: #0f2b28; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.68;
    font-size: 15.5px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }
h1, h2, h3, h4 { letter-spacing: -0.02em; }
svg { display: block; }

* { scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--text-3); background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* =========================================================
   Top bar
   ========================================================= */
.topbar {
    position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
    display: flex; align-items: center; gap: 16px; padding: 0 20px;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-logo {
    font-size: 18px; width: 34px; height: 34px; display: grid; place-items: center;
    background: var(--text); color: var(--bg); border-radius: 9px;
}
[data-theme="dark"] .brand-logo { background: var(--accent); color: #0b0c0f; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 14.5px; font-weight: 700; }
.brand-text small { font-size: 11.5px; color: var(--text-3); }

.topbar-search { position: relative; flex: 1; max-width: 480px; margin-inline: auto; display: flex; align-items: center; }
.topbar-search .search-icon { position: absolute; inset-inline-start: 12px; color: var(--text-3); pointer-events: none; }
.topbar-search input {
    width: 100%; height: 38px; padding: 0 40px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 9px; color: var(--text); font-family: var(--font); font-size: 14px;
    transition: border-color .14s, box-shadow .14s, background .14s;
}
.topbar-search input::placeholder { color: var(--text-3); }
.topbar-search input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); background: var(--bg); }
.topbar-search kbd { position: absolute; inset-inline-end: 11px; font-family: var(--mono); font-size: 11px; background: var(--bg); border: 1px solid var(--border); border-radius: 5px; padding: 1px 7px; color: var(--text-3); }
.topbar-actions { display: flex; gap: 4px; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; background: transparent; border: 1px solid transparent; border-radius: 9px; color: var(--text-2); cursor: pointer; transition: background .14s, color .14s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.menu-toggle { display: none; }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* =========================================================
   Layout
   ========================================================= */
.layout { display: flex; align-items: flex-start; }
.sidebar {
    position: sticky; top: var(--topbar-h); width: var(--sidebar-w); flex-shrink: 0;
    height: calc(100vh - var(--topbar-h)); overflow-y: auto; padding: 18px 12px 70px;
    border-inline-start: 1px solid var(--border); background: var(--bg-soft);
}
.sidebar-scrim { display: none; }
.content { flex: 1; min-width: 0; max-width: 1180px; margin-inline: auto; padding: 34px 46px 130px; }
.content:focus { outline: none; }

/* Skip-link — נגישות: מקפיץ ישירות לתוכן, מוסתר עד קבלת פוקוס במקלדת */
.skip-link { position: fixed; top: -80px; inset-inline-start: 12px; z-index: 300; background: var(--accent); color: #fff; padding: 9px 16px; border-radius: 9px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-md); transition: top .15s ease; }
.skip-link:focus { top: 10px; outline: none; }
[data-theme="dark"] .skip-link { color: #0b0c0f; }

.ep-grid { display: grid; grid-template-columns: minmax(0,1fr) var(--toc-w); gap: 50px; align-items: start; }
.ep-main { min-width: 0; }
.toc { position: sticky; top: calc(var(--topbar-h) + 28px); align-self: start; font-size: 13px; border-inline-end: 1px solid var(--border); padding-inline-end: 18px; }
.toc-title { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--text-3); text-transform: uppercase; margin-bottom: 12px; }
.toc a { display: flex; align-items: center; gap: 9px; padding: 5px 0; color: var(--text-2); transition: color .12s; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--accent); font-weight: 600; }
.toc a .toc-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--border-2); flex-shrink: 0; transition: background .12s, transform .12s; }
.toc a.active .toc-dot { background: var(--accent); transform: scale(1.6); }

/* =========================================================
   Sidebar nav
   ========================================================= */
.nav-home { display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin-bottom: 10px; border-radius: 9px; color: var(--text); font-weight: 600; font-size: 14px; }
.nav-home .nh-ic { color: var(--text-2); display: grid; place-items: center; }
.nav-home:hover { background: var(--surface-2); color: var(--text); }
.nav-home.active { background: var(--accent-soft); color: var(--accent); }
.nav-home.active .nh-ic { color: var(--accent); }

.nav-forum { display: flex; align-items: center; gap: 9px; padding: 8px 12px; margin-bottom: 12px; border-radius: 9px; color: var(--text-2); font-size: 13px; font-weight: 500; border: 1px solid var(--border); background: var(--surface); transition: color .12s, border-color .12s, background .12s; }
.nav-forum:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); background: var(--accent-soft); }
.nav-forum .nf-ic { color: var(--text-3); display: grid; place-items: center; }
.nav-forum:hover .nf-ic { color: var(--accent); }
.nav-forum .nf-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-forum .nf-ext { color: var(--text-3); display: grid; place-items: center; opacity: .8; }
.nav-forum:hover .nf-ext { color: var(--accent); }

.nav-cat { margin-bottom: 1px; }
.nav-cat-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; background: transparent; border: 0; cursor: pointer; color: var(--text); font-family: var(--font); font-size: 13.5px; font-weight: 600; border-radius: 8px; text-align: start; }
.nav-cat-head:hover { background: var(--surface-2); }
.nav-cat-emoji { color: var(--text-3); display: grid; place-items: center; width: 18px; flex-shrink: 0; }
.nav-cat-head .cat-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-cat-head .cat-count { font-size: 11px; font-weight: 600; color: var(--text-3); background: var(--surface-3); border-radius: 999px; padding: 1px 8px; }
.nav-cat-head .chev { color: var(--text-3); display: grid; place-items: center; width: 15px; }
.nav-cat-head .chev > span { display: grid; place-items: center; }
.nav-cat-head .chev .ic-closed { display: none; }
.nav-cat.collapsed .chev .ic-open { display: none; }
.nav-cat.collapsed .chev .ic-closed { display: grid; }
.nav-cat.collapsed .nav-items { display: none; }

.nav-items { padding: 2px 0 8px; margin-inline-start: 18px; border-inline-start: 1px solid var(--border); }
.nav-link { display: flex; align-items: center; gap: 8px; position: relative; padding: 6px 12px; margin-inline-start: 6px; color: var(--text-2); font-size: 13px; border-radius: 7px; cursor: pointer; transition: color .12s, background .12s; white-space: nowrap; overflow: hidden; }
.nav-link .nl-title { overflow: hidden; text-overflow: ellipsis; }
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.nav-link.active::before { content: ""; position: absolute; inset-inline-start: -6.5px; top: 50%; transform: translateY(-50%); width: 2px; height: 16px; background: var(--accent); border-radius: 2px; }
.nav-link .nl-name { font-family: var(--mono); font-size: 10.5px; opacity: .6; margin-inline-start: auto; }
.nav-empty { padding: 22px; color: var(--text-3); font-size: 13px; text-align: center; }

/* =========================================================
   Generic UI
   ========================================================= */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 9px; border: 1px solid transparent; font-family: var(--font); font-size: 14px; font-weight: 600; cursor: pointer; transition: background .14s, border-color .14s; }
.btn-primary { background: var(--accent); color: #fff; }
[data-theme="dark"] .btn-primary { color: #0b0c0f; }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: var(--surface); color: var(--text-2); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.muted { color: var(--text-2); }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 6px; font-size: 11.5px; font-weight: 700; line-height: 1.7; font-family: var(--mono); letter-spacing: .02em; }
.pill-get { background: var(--ok-soft); color: var(--ok); }
.pill-post { background: var(--accent-soft); color: var(--accent); }
.pill-req { background: var(--danger-soft); color: var(--danger); font-family: var(--font); }
.pill-opt { background: var(--surface-3); color: var(--text-2); font-family: var(--font); }
.pill-cond { background: var(--warn-soft); color: var(--warn); font-family: var(--font); }
.pill-license { background: var(--surface-3); color: var(--text-2); font-family: var(--font); }

/* Requirement legend (explains חובה / מותנה / רשות under a params table) */
.req-legend { display: flex; flex-wrap: wrap; gap: 7px 18px; margin-top: 11px; padding-inline-start: 2px; font-size: 12.5px; color: var(--text-2); }
.req-legend .rl-item { display: inline-flex; align-items: center; gap: 7px; }

/* =========================================================
   Endpoint page
   ========================================================= */
.ep-header { margin-bottom: 6px; }
.ep-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); margin-bottom: 16px; flex-wrap: wrap; }
.ep-breadcrumb a { color: var(--text-2); }
.ep-breadcrumb a:hover { color: var(--accent); }
.crumb-sep { color: var(--text-3); display: inline-grid; place-items: center; opacity: .7; }
.ep-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.ep-title-row h1 { font-size: 30px; font-weight: 800; margin: 0; }
.page-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); color: var(--accent); border: 1px solid var(--border); }
.ep-methods { display: flex; gap: 6px; align-items: center; }
.ep-desc { margin-top: 14px; font-size: 16px; color: var(--text-2); white-space: pre-line; max-width: 72ch; line-height: 1.72; }

/* Plain-language box */
.simple-box { display: flex; gap: 12px; margin-top: 20px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); border-inline-start: 3px solid var(--accent); }
.simple-box .sb-ic { flex-shrink: 0; color: var(--accent); margin-top: 1px; }
.simple-box .sb-body { min-width: 0; }
.simple-box .sb-label { font-size: 11px; font-weight: 700; color: var(--accent); letter-spacing: .04em; margin-bottom: 2px; }
.simple-box .sb-text { color: var(--text); font-size: 15px; }

/* Request line */
.reqline { margin-top: 22px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--radius); background: var(--code-bg); border: 1px solid var(--border-2); overflow: hidden; }
.reqline .rl-methods { display: flex; gap: 5px; }
.reqline .rl-url { font-family: var(--mono); font-size: 13px; direction: ltr; color: #c8cad4; flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; padding-bottom: 1px; }
.reqline .rl-url .u-base { color: #6b6f7d; }
.reqline .rl-url .u-cmd { color: #f0c674; font-weight: 500; }
.reqline .copy-btn { margin-inline-start: auto; }

/* Sections */
.section { margin-top: 42px; scroll-margin-top: calc(var(--topbar-h) + 22px); }
.section > h2 { position: relative; font-size: 18px; font-weight: 700; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.section > h2::before { content: ""; position: absolute; inset-inline-start: -14px; top: 4px; width: 3px; height: 17px; background: var(--accent); border-radius: 2px; }
.subhead { font-size: 14.5px; font-weight: 700; margin: 22px 0 10px; color: var(--text); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.doc { width: 100%; border-collapse: collapse; font-size: 14px; }
table.doc th, table.doc td { text-align: start; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.doc thead th { background: var(--surface-2); font-weight: 700; font-size: 12px; color: var(--text-2); letter-spacing: .02em; }
table.doc tbody tr:last-child td { border-bottom: 0; }
table.doc tbody tr:hover { background: var(--surface-2); }
table.doc code, .inline-code { font-family: var(--mono); font-size: 12.5px; direction: ltr; display: inline-block; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 0 6px; color: var(--accent); }
[data-theme="dark"] table.doc code, [data-theme="dark"] .inline-code { background: var(--surface-3); }
.col-param { white-space: nowrap; }
.param-name { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--text); direction: ltr; }
.td-notes { color: var(--text-2); font-size: 13px; margin-top: 4px; line-height: 1.55; }
.type-tag { font-family: var(--mono); font-size: 11.5px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); padding: 1px 7px; border-radius: 5px; direction: ltr; }
.err-code { font-family: var(--mono); font-weight: 700; color: var(--danger); background: var(--danger-soft); padding: 1px 8px; border-radius: 5px; }

/* Callouts */
.callout { display: flex; gap: 11px; padding: 13px 15px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); font-size: 14px; margin: 11px 0; line-height: 1.6; }
.callout .co-ic { flex-shrink: 0; margin-top: 2px; }
.callout p { margin: 0; }
.callout.info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.callout.info .co-ic { color: var(--accent); }
.callout.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.callout.warn .co-ic { color: var(--warn); }
.callout.tip { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 26%, transparent); }
.callout.tip .co-ic { color: var(--ok); }

/* Code blocks */
.code-block { margin: 13px 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-2); }
.code-head { display: flex; align-items: center; gap: 10px; background: var(--code-bg-2); padding: 8px 14px; }
.code-head .code-title { font-family: var(--mono); font-size: 12px; color: #8b8f9c; direction: ltr; }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.06); color: #c8cad4; border: 1px solid rgba(255,255,255,.1); border-radius: 7px; padding: 4px 10px; font-size: 12px; font-family: var(--font); font-weight: 600; cursor: pointer; transition: background .14s, color .14s; }
.code-head .copy-btn { margin-inline-start: auto; }
.copy-btn:hover { background: rgba(255,255,255,.13); color: #fff; }
.copy-btn.copied { background: var(--ok); color: #fff; border-color: transparent; }
pre.code { margin: 0; padding: 16px 18px; background: var(--code-bg); color: var(--code-text); overflow-x: auto; }
pre.code code { font-family: var(--mono); font-size: 12.8px; line-height: 1.75; direction: ltr; display: inline-block; min-width: 100%; white-space: pre; }
.tok-key { color: #8bb7ff; } .tok-str { color: #9ad3a0; } .tok-num { color: #e6a06a; }
.tok-bool { color: #c8a6ff; } .tok-punc { color: #8b8f9c; }
.tok-url-base { color: #6b6f7d; } .tok-url-cmd { color: #f0c674; } .tok-param { color: #8bb7ff; } .tok-val { color: #9ad3a0; }

/* =========================================================
   Try-it panel
   ========================================================= */
.tryit { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.tryit-head { display: flex; align-items: center; gap: 12px; padding: 15px 20px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.tryit-head-ic { flex-shrink: 0; width: 38px; height: 38px; display: grid; place-items: center; color: var(--accent); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.tryit-head-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.tryit-head-text h3 { margin: 0; font-size: 16px; font-weight: 700; }
.tryit-head-text small { font-size: 12px; color: var(--text-3); }
.tryit-head .badge-live { font-size: 11px; background: var(--surface-3); color: var(--text-2); padding: 4px 11px; border-radius: 999px; font-weight: 600; margin-inline-start: auto; align-self: center; flex-shrink: 0; letter-spacing: .01em; }

.tryit-body { padding: 22px; display: flex; flex-direction: column; gap: 22px; }
.tryit-col { display: flex; flex-direction: column; min-width: 0; }
.tryit-col + .tryit-col { border-top: 1px solid var(--border); padding-top: 22px; }
.tryit-col-head { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-bottom: 15px; }
.tryit-col-head .step-num { width: 20px; height: 20px; border-radius: 6px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
[data-theme="dark"] .tryit-col-head .step-num { color: #0b0c0f; }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; gap: 3px; margin-bottom: 16px; }
.seg-btn { border: 0; background: transparent; color: var(--text-2); font-family: var(--font); font-weight: 600; font-size: 12.5px; padding: 6px 16px; border-radius: 6px; cursor: pointer; transition: background .12s, color .12s; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-xs); }
.lang-tabs { display: inline-flex; align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; gap: 2px; margin-bottom: 12px; flex-wrap: wrap; }
.lang-tab { padding: 6px 13px; border-radius: 6px; border: 0; background: transparent; font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; font-family: var(--font); transition: background .12s, color .12s; }
.lang-tab:hover { color: var(--text); }
.lang-tab.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-xs); }

.tf-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 16px 20px; }
.tf-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tf-field.is-long { grid-column: 1 / -1; }
.tf-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tf-name { font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--text); direction: ltr; }
.tf-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.tf-field input, .tf-field textarea { width: 100%; padding: 9px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-family: var(--mono); font-size: 12.5px; direction: ltr; transition: border-color .14s, box-shadow .14s, background .14s; }
.tf-field input::placeholder, .tf-field textarea::placeholder { font-family: var(--font); direction: rtl; color: var(--text-3); }
.tf-field input:focus, .tf-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); background: var(--bg); }
.tf-field textarea { resize: vertical; min-height: 60px; }
.tf-field.is-token input { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.tf-empty { color: var(--text-2); font-size: 13.5px; padding: 6px 0; }
.tryit-out .code-block { margin: 0; }
.tryit-note { font-size: 12px; color: var(--text-3); margin-top: 12px; display: flex; gap: 7px; align-items: flex-start; line-height: 1.6; }
.tryit-note .tn-ic { flex-shrink: 0; margin-top: 1px; color: var(--text-3); }

/* Prev / next */
.ep-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 52px; }
.ep-nav-card { display: flex; align-items: center; gap: 12px; padding: 15px 17px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); transition: border-color .12s, background .12s; color: var(--text); }
.ep-nav-card:hover { border-color: var(--accent); background: var(--surface-2); color: var(--text); }
/* prev = כרטיס ימני (חץ בקצה הימני החיצוני); next = כרטיס שמאלי (חץ בקצה השמאלי החיצוני) */
.ep-nav-card.prev { flex-direction: row; }
.ep-nav-card.next { flex-direction: row-reverse; }
.ep-nav-card .nav-arrow { color: var(--text-3); flex-shrink: 0; display: grid; place-items: center; }
.ep-nav-card:hover .nav-arrow { color: var(--accent); }
.ep-nav-card .nc-main { min-width: 0; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.ep-nav-card.prev .nc-main { text-align: right; }
.ep-nav-card.next .nc-main { text-align: left; }
.ep-nav-card .nc-label { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.ep-nav-card .nc-title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* =========================================================
   Home
   ========================================================= */
.hero { padding: 30px 0 6px; }
.hero-eyebrow { font-size: 12.5px; font-weight: 700; color: var(--accent); letter-spacing: .01em; margin-bottom: 12px; }
.hero h1 { font-size: 38px; font-weight: 800; margin: 0 0 14px; letter-spacing: -0.03em; line-height: 1.12; }
.hero .lead { font-size: 18px; color: var(--text-2); max-width: 68ch; margin: 0 0 24px; line-height: 1.62; }
.hero-search { max-width: 560px; }
.hero-meta { display: flex; align-items: center; gap: 14px; margin-top: 20px; font-size: 13.5px; color: var(--text-3); }
.hero-meta b { color: var(--text); font-weight: 700; }
.dotsep { width: 4px; height: 4px; border-radius: 50%; background: var(--border-2); }

.home-section { margin-top: 50px; }
.home-section .hs-head { margin-bottom: 18px; }
.home-section h2 { font-size: 21px; font-weight: 800; margin: 0 0 5px; }
.home-section .hs-head p { margin: 0; color: var(--text-2); font-size: 15px; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cat-card { display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto; gap: 3px 15px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: border-color .14s, box-shadow .14s, background .14s; color: var(--text); }
.cat-card:hover { border-color: var(--border-2); box-shadow: var(--shadow-md); color: var(--text); }
.cat-card .cc-icon { grid-row: 1 / span 2; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--accent); border: 1px solid var(--border); }
.cat-card:hover .cc-icon { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.cat-card .cc-body { grid-column: 2; min-width: 0; }
.cat-card .cc-body h3 { margin: 2px 0 4px; font-size: 16px; font-weight: 700; }
.cat-card .cc-body p { margin: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
.cat-card .cc-count { grid-column: 2; margin-top: 10px; font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.cat-card .cc-open { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); }
.cat-card .ep-name { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); direction: ltr; }

/* Search results */
.search-results { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.sr-item { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: border-color .12s, background .12s; }
.sr-item:hover { border-color: var(--accent); background: var(--surface-2); }
.sr-item .sr-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); color: var(--accent); border: 1px solid var(--border); flex-shrink: 0; }
.sr-item .sr-main { min-width: 0; flex: 1; }
.sr-item .sr-name { font-family: var(--mono); font-size: 12px; color: var(--text-2); direction: ltr; }
.sr-item .sr-title { font-weight: 600; }
.sr-item .sr-cat { font-size: 12.5px; color: var(--text-3); }
.sr-arrow { color: var(--text-3); display: grid; place-items: center; }
.sr-item:hover .sr-arrow { color: var(--accent); }

/* Guide body */
.guide-body { font-size: 16px; line-height: 1.8; max-width: 74ch; }
.guide-body h3.subhead { font-size: 19px; font-weight: 700; margin-top: 34px; }
.guide-body p { margin: 0 0 14px; color: var(--text); }
.guide-body ul, .guide-body ol { margin: 0 0 16px; padding-inline-start: 22px; }
.guide-body li { margin-bottom: 7px; }
.guide-body kbd { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 7px; }
.concept-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 12px; margin: 10px 0 22px; }
.concept-card { padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); }
.concept-card .cc-ic { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); }
.concept-card .cc-ic svg { width: 18px; height: 18px; }
.concept-card h4 { margin: 11px 0 4px; font-size: 15px; font-weight: 700; }
.concept-card p { margin: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.55; }

/* =========================================================
   Toast & modal
   ========================================================= */
.toast { position: fixed; bottom: 26px; inset-inline-start: 50%; transform: translateX(50%) translateY(16px); background: var(--text); color: var(--bg); padding: 11px 20px; border-radius: 10px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-md); z-index: 200; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(50%) translateY(0); }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(10,12,16,.5); display: grid; place-items: center; padding: 20px; backdrop-filter: blur(3px); }
.modal-backdrop[hidden] { display: none; }
.modal { width: 100%; max-width: 480px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); border: 1px solid var(--border); overflow: hidden; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-start; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.field input, .field textarea { width: 100%; padding: 9px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-family: var(--font); font-size: 13.5px; transition: border-color .14s, box-shadow .14s, background .14s; }
.field input[dir="ltr"] { font-family: var(--mono); font-size: 12.5px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); background: var(--bg); }
.field small { font-size: 11.5px; color: var(--text-3); }

/* =========================================================
   Two-product UI (switcher, product cards)
   ========================================================= */
.pill-module { background: var(--accent-soft); color: var(--accent); font-family: var(--font); }

/* Sidebar product switcher */
.prod-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 14px; }
.prod-sw-btn { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid transparent; background: transparent; border-radius: 9px; cursor: pointer; font-family: var(--font); text-align: start; color: var(--text-2); transition: background .12s, color .12s, border-color .12s; min-width: 0; }
.prod-sw-btn .psw-ic { color: var(--text-3); flex-shrink: 0; }
.prod-sw-btn .psw-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.prod-sw-btn .psw-txt b { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-sw-btn .psw-txt small { font-size: 10px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-sw-btn.active { background: var(--surface); border-color: var(--border); color: var(--accent); box-shadow: var(--shadow-xs); }
.prod-sw-btn.active .psw-ic { color: var(--accent); }
.prod-sw-btn.active .psw-txt small { color: color-mix(in srgb, var(--accent) 70%, var(--text-3)); }

/* Home product cards */
.prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.prod-card { --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent); display: flex; flex-direction: column; padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); color: var(--text); transition: border-color .14s, box-shadow .14s, transform .14s; }
.prod-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow-md); transform: translateY(-3px); color: var(--text); }
.prod-card .pc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.prod-card .pc-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.prod-card .pc-tag { font-size: 11.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 4px 11px; border-radius: 999px; }
.prod-card h3 { margin: 0 0 8px; font-size: 20px; font-weight: 800; }
.prod-card p { margin: 0; font-size: 14.5px; color: var(--text-2); line-height: 1.6; flex: 1; }
.prod-card .pc-flow { margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--border-2); font-size: 12.5px; color: var(--text-3); line-height: 1.55; }
.prod-card .pc-cta { margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--accent); display: flex; align-items: center; gap: 6px; }

/* "switch to other product" strip */
.switch-product { --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent); display: flex; align-items: center; gap: 12px; margin-top: 24px; padding: 15px 18px; border: 1px dashed color-mix(in srgb, var(--accent) 40%, var(--border)); border-radius: var(--radius); background: var(--accent-soft); color: var(--text); font-size: 14px; }
.switch-product:hover { border-style: solid; color: var(--text); }
.switch-product .sp-ic { color: var(--accent); flex-shrink: 0; }
.switch-product .sp-txt { flex: 1; }
.switch-product .sp-arrow { color: var(--accent); }

.sr-prod { color: var(--accent); font-weight: 700; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1150px) {
    .ep-grid { grid-template-columns: 1fr; }
    .toc { display: none; }
}
@media (max-width: 860px) {
    .menu-toggle { display: grid; }
    .brand-text small { display: none; }
    .topbar-search kbd { display: none; }
    .sidebar { position: fixed; top: var(--topbar-h); bottom: 0; right: 0; left: auto; width: var(--sidebar-w); max-width: 86vw; z-index: 60; box-shadow: var(--shadow-md); height: auto; display: none; }
    .sidebar.open { display: block; animation: drawerIn .22s ease; }
    @keyframes drawerIn { from { transform: translateX(30px); opacity: .4; } to { transform: translateX(0); opacity: 1; } }
    .sidebar-scrim.show { display: block; position: fixed; inset-block: var(--topbar-h) 0; inset-inline: 0; background: rgba(0,0,0,.4); z-index: 55; }
    .content { padding: 24px 18px 110px; }
    .ep-title-row h1 { font-size: 25px; }
    .hero h1 { font-size: 29px; }
    .hero .lead { font-size: 16px; }
    .ep-nav { grid-template-columns: 1fr; }
    .prod-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .topbar-search { display: none; }
    /* בסרגל צד צר (מגירת מובייל) המתג עובר לעמודה אחת כדי שהתיאורים ייכנסו במלואם */
    .prod-switch { grid-template-columns: 1fr; }
}
