/* «جرّب المحرر»: the welcome, the companion and the trial's dialogs. Only in try.html. */
.preznta-trial { --tg-ink: #121a21; --tg-muted: #6b7a85; --tg-line: #e5eaee; --tg-accent: var(--brand-primary, #0085ff); }
.preznta-trial .pz-usage-host { display: none !important; }

/* ---------------------------------------------------------------- welcome */
.tw { min-height: 100vh; background: radial-gradient(1200px 600px at 85% -10%, #eef4fb 0%, transparent 60%), #fbfcfd; color: var(--tg-ink); font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif; display: flex; flex-direction: column; overflow: auto; }
.tw-head { display: flex; align-items: center; justify-content: space-between; padding: 22px clamp(18px, 4vw, 48px); }
.tw-brand img { height: 34px; display: block; }
.tw-back { display: inline-flex; align-items: center; gap: 6px; color: var(--tg-muted); text-decoration: none; font-size: 13px; }
.tw-back svg { width: 16px; }
.tw-split { flex: 1; display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; padding: 10px clamp(18px, 5vw, 72px) 40px; max-width: 1280px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.tw-form { --c: #0F7A6E; display: grid; gap: 16px; }
.tw-eyebrow { display: inline-flex; width: fit-content; padding: 6px 12px; border-radius: 99px; background: color-mix(in srgb, var(--c) 10%, #fff); color: var(--c); font-size: 12px; font-weight: 600; }
.tw-form h1 { margin: 0; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.25; letter-spacing: -.5px; }
.tw-form h1 span { color: var(--c); transition: color .3s; }
.tw-lead { margin: 0; color: var(--tg-muted); font-size: 15px; line-height: 1.9; }
.tw-logo { cursor: pointer; }
.tw-logo-box { display: grid; place-items: center; height: 118px; border: 1.5px dashed #cfd8df; border-radius: 18px; background: #fff; transition: border-color .2s, background .2s; overflow: hidden; }
.tw-logo:hover .tw-logo-box, .tw-logo.is-over .tw-logo-box { border-color: var(--c); background: color-mix(in srgb, var(--c) 4%, #fff); }
.tw-logo-box img { max-width: 70%; max-height: 82px; object-fit: contain; }
.tw-logo-box [data-empty] { display: grid; justify-items: center; gap: 4px; color: var(--tg-muted); }
.tw-logo-box [data-empty] svg { width: 26px; height: 26px; color: var(--c); }
.tw-logo-box b { font-size: 14px; color: var(--tg-ink); }
.tw-logo-box small { font-size: 11.5px; }
.tw-colors { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tw-colors > b { font-size: 13px; margin-inline-end: 4px; }
.tw-swatches { display: flex; gap: 8px; }
.tw-swatches button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--s); cursor: pointer; box-shadow: inset 0 0 0 1px #0000001a; transition: transform .15s; }
.tw-swatches button:hover { transform: scale(1.08); }
.tw-swatches button.is-on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--s); }
.tw-pick { position: relative; width: 30px; height: 30px; border-radius: 50%; border: 1.5px dashed #c2ccd4; display: grid; place-items: center; cursor: pointer; color: var(--tg-muted); }
.tw-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tw-pick svg { width: 14px; }
.tw-field { display: grid; gap: 6px; }
.tw-field > span { font-size: 13px; font-weight: 600; }
.tw-field input { height: 48px; padding: 0 14px; border-radius: 13px; border: 1px solid #dbe2e7; background: #fff; font: inherit; font-size: 14.5px; outline: none; transition: border-color .2s, box-shadow .2s; }
.tw-field input:focus { border-color: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 14%, transparent); }
.tw-field small { color: var(--tg-muted); font-size: 11.5px; }
.tw-error { margin: 0; min-height: 18px; color: #b42318; font-size: 13px; }
.tw-cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 54px; padding: 0 26px; border: 0; border-radius: 15px; background: var(--c, #0085ff); color: #fff; font: 600 16px/1 'IBM Plex Sans Arabic', sans-serif; cursor: pointer; text-decoration: none; box-shadow: 0 12px 30px color-mix(in srgb, var(--c, #0085ff) 30%, transparent); transition: transform .15s, box-shadow .2s; }
.tw-cta:hover { transform: translateY(-1px); }
.tw-cta svg { width: 18px; transition: transform .2s; }
.tw-cta:hover svg { transform: translateX(-4px); }
.tw-cta.is-busy { opacity: .75; pointer-events: none; }
.tw-cta.is-busy span::after { content: '…'; }
.tw-ghost { display: inline-flex; align-items: center; height: 54px; padding: 0 22px; border-radius: 15px; border: 1px solid var(--tg-line); color: var(--tg-ink); text-decoration: none; }
.tw-terms { color: var(--tg-muted); font-size: 11.5px; }
.tw-terms a { color: inherit; }
.tw-preview { --c: #0F7A6E; display: grid; gap: 18px; justify-items: center; }
.tw-slide { width: min(560px, 100%); aspect-ratio: 16 / 9; border-radius: 22px; background: #fff; box-shadow: 0 40px 90px #18263214, 0 0 0 1px #0000000a; padding: 7% 8%; box-sizing: border-box; display: flex; flex-direction: column; gap: 4%; position: relative; overflow: hidden; transition: box-shadow .3s; animation: tw-float 6s ease-in-out infinite; }
.tw-slide::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 2.4%; background: var(--c); transition: background .3s; }
.tw-slide::after { content: ''; position: absolute; inset-inline-end: -12%; bottom: -30%; width: 46%; aspect-ratio: 1; border-radius: 50%; background: color-mix(in srgb, var(--c) 9%, #fff); transition: background .3s; }
.tw-slide-top { display: flex; align-items: center; justify-content: space-between; }
.tw-slide-top i { width: 22%; height: 6px; border-radius: 6px; background: color-mix(in srgb, var(--c) 18%, #fff); }
.tw-mark { width: 46px; height: 46px; border-radius: 12px; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 20px; transition: background .3s; overflow: hidden; }
.tw-mark.has-logo { background: transparent; width: 110px; justify-items: start; }
.tw-mark img { max-width: 100%; max-height: 46px; object-fit: contain; }
.tw-slide > b { font-size: clamp(20px, 2.4vw, 30px); color: var(--tg-ink); z-index: 1; }
.tw-slide > p { margin: 0; color: var(--tg-muted); font-size: 14px; z-index: 1; }
.tw-bars { display: flex; gap: 6px; z-index: 1; }
.tw-bars i { height: 6px; border-radius: 6px; background: var(--c); width: 18%; opacity: .9; transition: background .3s; }
.tw-bars i:nth-child(2) { width: 9%; opacity: .5; }
.tw-bars i:nth-child(3) { width: 5%; opacity: .25; }
.tw-kpis { margin-top: auto; display: flex; gap: 12px; z-index: 1; }
.tw-kpis span { flex: 1; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--c) 7%, #fff); font-size: 11px; color: var(--tg-muted); display: grid; gap: 2px; transition: background .3s; }
.tw-kpis b { font-size: 18px; color: var(--c); transition: color .3s; }
.tw-chip-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tw-chip-row span { display: inline-flex; gap: 6px; align-items: center; padding: 7px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--tg-line); font-size: 12px; color: var(--tg-muted); }
.tw-chip-row svg { width: 14px; color: var(--c); }
@keyframes tw-float { 0%, 100% { transform: translateY(0) rotate(-.4deg); } 50% { transform: translateY(-8px) rotate(.4deg); } }
.tw-center { flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; gap: 14px; padding: 40px 20px; }
.tw-center h1 { margin: 0; font-size: 30px; }
.tw-center p { margin: 0; color: var(--tg-muted); max-width: 460px; line-height: 1.8; }
.tw-end-mark { width: 64px; }
.tw-end-actions { display: flex; gap: 10px; }
@media (max-width: 900px) { .tw-split { grid-template-columns: 1fr; } .tw-preview { order: -1; } .tw-slide { width: 100%; } .tw-chip-row { display: none; } }

/* ---------------------------------------------------------------- the companion */
.tg { position: fixed; z-index: 2500; inset-inline-end: 18px; bottom: 18px; font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif; color: var(--tg-ink); }
.tg-card { width: min(340px, calc(100vw - 36px)); max-height: min(520px, calc(100vh - 120px)); display: flex; flex-direction: column; background: #fff; border-radius: 22px; box-shadow: 0 24px 70px #0f1d2a2e, 0 0 0 1px #0000000d; overflow: hidden; transform-origin: bottom left; animation: tg-in .35s cubic-bezier(.2, .9, .3, 1.2); }
.tg.is-min .tg-card { display: none; }
.tg-fab { display: none; position: relative; width: 58px; height: 58px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 14px 40px #0f1d2a33; cursor: pointer; padding: 12px; }
.tg.is-min .tg-fab { display: block; }
.tg-fab img { width: 100%; height: 100%; object-fit: contain; }
.tg-ping { position: absolute; top: 4px; inset-inline-end: 4px; width: 12px; height: 12px; border-radius: 50%; background: #e5484d; border: 2px solid #fff; display: none; }
.tg.has-news .tg-ping { display: block; animation: tg-pulse 1.6s infinite; }
.tg-card header { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px; border-bottom: 1px solid #f0f3f5; }
.tg-card header img { width: 34px; height: 34px; object-fit: contain; padding: 5px; border-radius: 11px; background: #f3f7fb; }
.tg-card header div { flex: 1; min-width: 0; }
.tg-card header b { display: block; font-size: 13.5px; }
.tg-card header small { display: block; font-size: 11px; color: var(--tg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-card header button { width: 30px; height: 30px; border: 0; border-radius: 9px; background: none; color: var(--tg-muted); cursor: pointer; display: grid; place-items: center; }
.tg-card header button:hover { background: #f2f5f7; color: var(--tg-ink); }
.tg-card header svg { width: 17px; }
.tg-list { flex: 1; overflow: auto; padding: 12px 14px 4px; display: grid; gap: 8px; align-content: start; }
.tg-msg { justify-self: start; max-width: 92%; padding: 10px 13px; border-radius: 16px 16px 16px 5px; background: #f3f6f9; font-size: 13.5px; line-height: 1.85; animation: tg-msg .3s ease-out; }
.tg-msg b { color: var(--tg-accent); }
.tg-msg.is-typing { display: inline-flex; gap: 4px; padding: 13px 14px; }
.tg-msg.is-typing i { width: 6px; height: 6px; border-radius: 50%; background: #9fb0bc; animation: tg-dot 1s infinite; }
.tg-msg.is-typing i:nth-child(2) { animation-delay: .15s; }
.tg-msg.is-typing i:nth-child(3) { animation-delay: .3s; }
.tg-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px 14px; }
.tg-chips:empty { display: none; }
.tg-chips button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--tg-line); background: #fff; font: inherit; font-size: 12.5px; cursor: pointer; transition: border-color .15s, background .15s; }
.tg-chips button:hover { border-color: var(--tg-accent); }
.tg-chips button.is-primary { background: var(--tg-accent); border-color: var(--tg-accent); color: #fff; }
.tg-chips svg { width: 15px; }
.tg-journey { padding: 12px 14px; border-bottom: 1px solid #f0f3f5; background: #fbfcfd; }
.tg-progress { display: grid; grid-template-columns: 1fr auto; gap: 6px; font-size: 12.5px; }
.tg-progress span { color: var(--tg-muted); }
.tg-progress i { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: #e9eef2; overflow: hidden; position: relative; }
.tg-progress i::after { content: ''; position: absolute; inset: 0; width: var(--v); background: var(--tg-accent); border-radius: inherit; transition: width .4s; }
.tg-journey ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.tg-journey li { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--tg-muted); }
.tg-journey li svg { width: 16px; color: #c3cdd4; }
.tg-journey li.is-done { color: var(--tg-ink); }
.tg-journey li.is-done svg { color: #12a150; }
@keyframes tg-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes tg-msg { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes tg-dot { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
@keyframes tg-pulse { 0% { box-shadow: 0 0 0 0 #e5484d66; } 70% { box-shadow: 0 0 0 8px #e5484d00; } 100% { box-shadow: 0 0 0 0 #e5484d00; } }

/* ---------------------------------------------------------------- notes, pill */
.tg-note { display: flex; gap: 12px; margin: 0 0 14px; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--tg-accent) 8%, #fff), #fff); border: 1px solid color-mix(in srgb, var(--tg-accent) 20%, #fff); font-family: 'IBM Plex Sans Arabic', sans-serif; }
.tg-note > span { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: #fff; color: var(--tg-accent); box-shadow: 0 4px 12px #0000000d; }
.tg-note > span svg { width: 17px; }
.tg-note b { font-size: 13px; }
.tg-note p { margin: 4px 0; font-size: 12.5px; line-height: 1.8; color: #3c4b55; }
.tg-note small { display: block; font-size: 11px; color: var(--tg-muted); line-height: 1.7; }
.tg-note button { margin-top: 8px; border: 0; background: none; padding: 0; color: var(--tg-accent); font: 600 12px/1.4 inherit; cursor: pointer; }
.tg-pill { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; margin-inline-end: auto; padding: 6px 6px 6px 12px; padding-inline-start: 12px; border-radius: 99px; background: #fff; border: 1px solid var(--tg-line); font-size: 12px; color: var(--tg-muted); }
.tg-pill button { white-space: nowrap; width: auto !important; min-width: max-content; display: inline-flex !important; align-items: center; height: 28px !important; padding: 0 12px; border-radius: 99px; border: 0; background: var(--tg-accent); color: #fff; font: 600 11.5px/1 inherit; cursor: pointer; }
.tg-dot { width: 8px; height: 8px; border-radius: 50%; background: #12a150; box-shadow: 0 0 0 3px #12a15022; }
.tg-lock { margin-inline-start: auto; opacity: .55; display: inline-flex; }
.tg-lock svg { width: 14px !important; }

/* ---------------------------------------------------------------- dialogs */
.tg-dialog { width: min(480px, calc(100vw - 32px)); border: 0; border-radius: 26px; padding: 30px 28px 24px; box-shadow: 0 40px 100px #0f1d2a40; font-family: 'IBM Plex Sans Arabic', sans-serif; color: var(--tg-ink); text-align: center; position: relative; }
.tg-dialog.is-wide { width: min(640px, calc(100vw - 32px)); }
.tg-dialog::backdrop { background: #0d1820a6; backdrop-filter: blur(5px); }
.tg-dialog[open] { animation: tg-in .3s ease-out; }
.tg-x { position: absolute; top: 14px; inset-inline-end: 14px; width: 34px; height: 34px; border: 0; border-radius: 10px; background: #f3f6f8; color: var(--tg-muted); cursor: pointer; display: grid; place-items: center; }
.tg-x svg { width: 16px; }
.tg-dialog h2 { margin: 6px 0 8px; font-size: 22px; }
.tg-dialog p { margin: 0 0 14px; color: #4b5a64; font-size: 14px; line-height: 1.9; }
.tg-reason { padding: 10px 12px; border-radius: 12px; background: #fff7e8; color: #7a5300 !important; font-size: 13px !important; }
.tg-soft { display: block; color: var(--tg-muted) !important; font-size: 12px !important; margin-top: 10px; }
.tg-art { position: relative; width: 120px; height: 70px; margin: 0 auto 8px; }
.tg-art span { position: absolute; width: 74px; height: 46px; border-radius: 11px; }
.tg-art span:nth-child(1) { left: 6px; top: 22px; background: #0001fc; transform: rotate(-8deg); }
.tg-art span:nth-child(2) { left: 24px; top: 12px; background: #0091fa; transform: rotate(-2deg); }
.tg-art span:nth-child(3) { left: 42px; top: 2px; background: #01cbfb; transform: rotate(5deg); }
.tg-features { list-style: none; margin: 4px 0 18px; padding: 0; display: grid; gap: 8px; text-align: start; }
.tg-features li { display: flex; gap: 10px; align-items: center; font-size: 13.5px; }
.tg-features li svg { width: 18px; flex: none; color: #12a150; }
.tg-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tg-cta { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 22px; border-radius: 14px; border: 0; background: var(--tg-accent); color: #fff; font: 600 14.5px/1 inherit; cursor: pointer; text-decoration: none; box-shadow: 0 10px 26px color-mix(in srgb, var(--tg-accent) 30%, transparent); }
.tg-ghost { height: 48px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--tg-line); background: #fff; font: inherit; font-size: 14px; cursor: pointer; color: var(--tg-ink); }
.tg-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 18px; text-align: start; }
.tg-plans article { padding: 14px; border-radius: 16px; border: 1px solid var(--tg-line); display: grid; gap: 4px; }
.tg-plans article.is-pro { border-color: var(--tg-accent); background: color-mix(in srgb, var(--tg-accent) 5%, #fff); }
.tg-plans small { color: var(--tg-muted); font-size: 12px; }
.tg-plans b { font-size: 22px; }
.tg-plans em { font-style: normal; font-size: 12px; color: var(--tg-muted); font-weight: 500; }
.tg-plans span { font-size: 12px; color: #4b5a64; line-height: 1.7; }
.tg-badge { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 99px; background: color-mix(in srgb, var(--tg-accent) 10%, #fff); color: var(--tg-accent); font-size: 12px; font-weight: 600; }
.tg-badge svg { width: 14px; }
.tg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 20px; text-align: start; }
.tg-grid article { padding: 14px; border-radius: 16px; border: 1px solid var(--tg-line); display: grid; gap: 4px; }
.tg-grid svg { width: 20px; color: var(--tg-accent); }
.tg-grid b { font-size: 13.5px; }
.tg-grid small { font-size: 11.5px; color: var(--tg-muted); }
.tg-meters { display: grid; gap: 8px; margin: 0 0 18px; text-align: start; }
.tg-meters div { display: flex; justify-content: space-between; padding: 12px 14px; border-radius: 14px; background: #f6f8fa; font-size: 13px; }
.tg-meters small { color: var(--tg-muted); font-size: 13px; }
.tg-done { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: #e9f8ef; color: #12a150; }
.tg-done svg { width: 32px; height: 32px; }
@media (max-width: 560px) { .tg-grid, .tg-plans { grid-template-columns: 1fr; } .tg { inset-inline-end: 10px; bottom: 10px; } }
@media (prefers-reduced-motion: reduce) { .tw-slide, .tg-card, .tg-msg { animation: none !important; } }
body:has(.preznta-tour) .tg { opacity: 0; pointer-events: none; }
.tg { transition: opacity .25s; }
/* the companion: out of the way of the editor's controls; draggable; can be hidden */
.tg { bottom: 86px; }
.tg-card header { cursor: grab; touch-action: none; }
.tg.is-dragging, .tg.is-dragging .tg-card header { cursor: grabbing; user-select: none; }
.tg-fab { touch-action: none; cursor: grab; }
.tg-tab { display: none; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 99px; background: #fff; box-shadow: 0 8px 24px #0f1d2a29; font: 600 12px/1 'IBM Plex Sans Arabic', sans-serif; color: var(--tg-ink); cursor: pointer; }
.tg-tab svg { width: 15px; color: var(--tg-accent); }
.tg.is-hidden .tg-card, .tg.is-hidden .tg-fab { display: none !important; }
.tg.is-hidden .tg-tab { display: inline-flex; opacity: .85; }
.tg.is-hidden .tg-tab:hover { opacity: 1; }
.tw-logo-box [data-empty][hidden] { display: none; }
