/* Side-menu rows that need the app (round 13): keyboard row, «عبر التطبيق» chip, offline-library banner. */
/* Keyboard row: the same 22px icon + label grid, weight and colour as the neighbouring rows. */
#site-menu #tj-keyboard-open{display:grid!important;grid-template-columns:22px minmax(0,1fr)!important;align-items:center;gap:12px!important;box-sizing:border-box;
  inline-size:100%!important;min-block-size:48px!important;block-size:auto!important;padding:10px 4px!important;margin:0!important;border:0!important;border-radius:0!important;
  background:none!important;box-shadow:none!important;color:var(--ink);font:inherit;font-size:15px!important;font-weight:600!important;line-height:1.6!important;text-align:start;text-decoration:none!important;cursor:pointer}
#site-menu #tj-keyboard-open>svg{grid-column:1;grid-row:1;inline-size:22px!important;block-size:22px!important;color:var(--teal-dark,currentColor);stroke-width:1.7}
#site-menu #tj-keyboard-open>span{grid-column:2;grid-row:1}
#site-menu #tj-keyboard-open:focus-visible{outline:2px solid var(--focus,#0a7d68);outline-offset:1px}
:root[data-theme=dark] #site-menu #tj-keyboard-open>svg{color:#75ded4}
/* Label + chip: one flex line inside the row's span; the chip never wraps or shrinks. */
#site-menu .tj-app-row{display:flex!important;align-items:center;gap:8px;min-inline-size:0}
#site-menu .tj-app-row>.tj-lbl{flex:0 1 auto;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#site-menu #tj-keyboard-open .tj-lbl{white-space:normal;overflow-wrap:anywhere;overflow:visible}
#site-menu .tj-app-chip{flex:none;display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:999px;background:rgba(10,125,104,.12);color:#075446;
  font-style:normal;font-size:11px!important;font-weight:600;line-height:1.5;white-space:nowrap}
#site-menu .tj-app-chip svg,:root body #site-menu #offline-open .tj-app-chip svg{flex:none;inline-size:12px!important;block-size:12px!important;width:12px!important;height:12px!important;grid-area:auto!important;color:inherit!important;stroke:currentColor;fill:none}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]) #site-menu .tj-app-chip{background:rgba(47,240,194,.16);color:#8ff0d6}}
:root[data-theme=dark] #site-menu .tj-app-chip{background:rgba(47,240,194,.16);color:#8ff0d6}

/* Banner at the top of the web offline library. */
.tj-offline-banner{display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:10px;margin:0 0 12px;padding:10px 12px;border-radius:14px;
  border:1px solid var(--p-line,var(--line,#d8e8e2));background:var(--p-tint,rgba(10,125,104,.11));color:var(--p-ink,var(--ink,#0b2b27))}
.tj-offline-banner>svg{inline-size:20px;block-size:20px;color:var(--p-brand,#0a7d68)}
.tj-offline-banner p{margin:0;font-size:14px;line-height:1.55;font-weight:600}
.tj-offline-banner__btn{min-block-size:44px;padding:0 14px;border:0;border-radius:12px;background:#075446;color:#fff;font:inherit;font-size:13.5px;font-weight:700;cursor:pointer;white-space:nowrap}
.tj-offline-banner__btn:focus-visible{outline:3px solid var(--p-brand,#0a7d68);outline-offset:2px}
:root[data-theme=dark] .tj-offline-banner__btn{background:#2ff0c2;color:#03140f}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .tj-offline-banner__btn{background:#2ff0c2;color:#03140f}}
@media (max-width:359px){.tj-offline-banner{grid-template-columns:minmax(0,1fr) auto}.tj-offline-banner>svg{display:none}}

/* Round 33 (web port of iOS glass-shell §9, 1.0.8/1.0.9): side-menu icons in soft coloured badges, one hue per item, the offline library as a filled
   emerald badge and the keyboard row as a filled Tarjawan Tiffany badge. Colour and size only: rows, labels and handlers are unchanged. */
html:root body #site-menu#site-menu :is(section,nav,.menu-tools) :is(button,a):not(.menu-account-card)>svg:first-child{
  --mi:#0f9f8f;box-sizing:content-box!important;inline-size:20px!important;block-size:20px!important;padding:9px!important;flex:0 0 auto!important;
  border-radius:13px!important;color:color-mix(in srgb,var(--mi) 82%,#06221c)!important;
  background:linear-gradient(145deg,color-mix(in srgb,var(--mi) 22%,transparent),color-mix(in srgb,var(--mi) 10%,transparent))!important;
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--mi) 26%,transparent),0 4px 10px -6px color-mix(in srgb,var(--mi) 70%,transparent)!important;
  stroke-width:1.9;transition:transform .18s ease,background .18s ease,box-shadow .18s ease}
:root[data-theme=dark] body #site-menu#site-menu :is(section,nav,.menu-tools) :is(button,a):not(.menu-account-card)>svg:first-child{color:color-mix(in srgb,var(--mi) 70%,#fff)!important}
@media (prefers-color-scheme:dark){:root:not([data-theme]) body #site-menu#site-menu :is(section,nav,.menu-tools) :is(button,a):not(.menu-account-card)>svg:first-child{color:color-mix(in srgb,var(--mi) 70%,#fff)!important}}
html:root body #site-menu#site-menu#site-menu [data-menu-action=account]:not(.menu-account-card)>svg:first-child{--mi:#14b8a6}
html:root body #site-menu#site-menu#site-menu [data-menu-action=plans]>svg:first-child{--mi:#6366f1}
html:root body #site-menu#site-menu#site-menu #tj-invite-open>svg:first-child{--mi:#f59e0b}
html:root body #site-menu#site-menu#site-menu #menu-theme>svg:first-child{--mi:#8b5cf6}
html:root body #site-menu#site-menu#site-menu #ui-lang-open>svg:first-child{--mi:#0ea5e9}
html:root body #site-menu#site-menu#site-menu #settings-button>svg:first-child{--mi:#64748b}
html:root body #site-menu#site-menu#site-menu nav a[href="/faq"]>svg:first-child{--mi:#3b82f6}
html:root body #site-menu#site-menu#site-menu nav a[href="/contact"]>svg:first-child{--mi:#f43f5e}
html:root body #site-menu#site-menu#site-menu nav a[href="/about"]>svg:first-child{--mi:#eab308}
/* the offline library: a filled emerald badge, so the flagship feature stands out */
html:root body #site-menu#site-menu #offline-open>svg:first-child{color:#fff!important;stroke-width:1.8;
  background:linear-gradient(145deg,#34d399 0%,#10b981 45%,#0b7f71 100%)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 6px 14px -6px rgba(11,127,113,.75)!important}
/* «كيبورد ترجوان»: the same filled badge in Tarjawan Tiffany */
html:root body #site-menu#site-menu#site-menu #tj-keyboard-open>svg:first-child{color:#fff!important;stroke-width:1.8;
  background:linear-gradient(145deg,#81D8D0 0%,#0ABAB5 45%,#078a85 100%)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 6px 14px -6px rgba(7,138,133,.75)!important}
/* touch feedback */
html:root body #site-menu#site-menu :is(section,nav,.menu-tools) :is(button,a):not(.menu-account-card):active>svg:first-child{transform:scale(.92)}
html:root body #site-menu#site-menu :is(#offline-open,#tj-keyboard-open):active>svg:first-child{filter:brightness(1.08)}
html:root body #site-menu#site-menu :is(section,nav,.menu-tools) :is(button,a){-webkit-tap-highlight-color:transparent}
/* the rows are grids with a 22px icon column: widen it to the 38px badge so the label keeps its gap */
html:root body #site-menu#site-menu#site-menu :is(section,nav,.menu-tools) :is(button,a):not(.menu-account-card):has(>svg:first-child){grid-template-columns:38px minmax(0,1fr) auto!important;column-gap:14px!important}
html:root body #site-menu#site-menu#site-menu :is(#tj-keyboard-open,#tj-invite-open):has(>svg:first-child){grid-template-columns:38px minmax(0,1fr)!important;column-gap:14px!important}
@media (prefers-reduced-motion:reduce){html:root body #site-menu#site-menu :is(section,nav,.menu-tools) :is(button,a)>svg:first-child{transition:none}}
