/* The Appearance button and panel: the same on every page (static/js/appearance.js). Dark on a dark page, light otherwise. */
.apx { position: relative; display: inline-block; flex: none; }
.apx-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(148, 163, 184, .4); background: rgba(255, 255, 255, .05); color: #94a3b8; transition: color .15s, border-color .15s; }
.apx-btn:hover, .apx-btn[aria-expanded="true"] { color: var(--accent, #d4af37); border-color: var(--accent, #d4af37); }
.apx-btn .material-symbols-outlined { font-size: 20px; }
html:not(.dark) .apx-btn { background: #ffffff; border-color: #cbd5e1; color: #475569; }
.apx-panel { position: fixed; z-index: 1001; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 24px)); max-height: min(86vh, 720px); overflow-y: auto; padding: 14px; border-radius: 20px; background: #0f1b2d; color: #e2e8f0; border: 1px solid #2a3a52;
  box-shadow: 0 26px 60px -20px rgba(0, 0, 0, .75); font-size: 13px; text-align: start; }
.apx-panel[hidden] { display: none; }
.apx-row { display: flex; gap: 8px; padding-bottom: 10px; margin-bottom: 8px; border-bottom: 1px solid #2a3a52; }
.apx-row button { height: 40px; border-radius: 10px; border: 1px solid #3b4d68; background: #0f1b2d; color: #e2e8f0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; }
.apx-sq { width: 44px; flex: none; } .apx-wide { flex: 1; }
.apx-row button:hover, .apx-row button.on { border-color: var(--accent, #d4af37); color: var(--accent, #d4af37); }
.apx-row .material-symbols-outlined { font-size: 20px; }
.apx-fonts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding-bottom: 10px; margin-bottom: 8px; border-bottom: 1px solid #2a3a52; }
.apx-fonts button { cursor: pointer; border: 1px solid #3b4d68; background: transparent; color: inherit; border-radius: 10px; padding: 7px 8px; font: inherit; text-align: start; }
.apx-fonts button:hover, .apx-fonts button.on { border-color: var(--accent, #d4af37); color: var(--accent, #d4af37); }
.apx-cap, .apx-cap2 { display: block; padding: 4px 4px 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; }
.apx-select { width: 100%; height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid #3b4d68; background: #14243a; color: #e2e8f0; font: inherit; font-size: 13px; cursor: pointer; }
.apx-chead { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid #2a3a52; }
.apx-cap2 { padding: 0 4px; }
.apx-reset { background: none; border: 0; cursor: pointer; font: inherit; font-size: 12px; color: var(--accent, #d4af37); }
.apx-reset:hover { text-decoration: underline; }
.apx-colours { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 4px 4px; }
.apx-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; transition: transform .12s; position: relative; overflow: hidden; }
.apx-dot:hover { transform: scale(1.12); } .apx-dot.on { border-color: #ffffff; }
.apx-custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); border: 1px solid #3b4d68; display: inline-block; }
.apx-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
html:not(.dark) .apx-panel { background: #ffffff; color: #0f172a; border-color: #e2e8f0; box-shadow: 0 26px 60px -24px rgba(15, 23, 42, .35); }
html:not(.dark) .apx-row, html:not(.dark) .apx-fonts, html:not(.dark) .apx-chead { border-color: #e2e8f0; }
html:not(.dark) .apx-row button { background: #ffffff; color: #0f172a; border-color: #cbd5e1; }
html:not(.dark) .apx-fonts button { border-color: #cbd5e1; }
html:not(.dark) .apx-select { background: #f8fafc; color: #0f172a; border-color: #cbd5e1; }
html:not(.dark) .apx-cap, html:not(.dark) .apx-cap2 { color: #64748b; }
html:not(.dark) .apx-dot.on { border-color: #0f172a; }

.apx-back { position: fixed; inset: 0; z-index: 1000; background: rgba(2, 6, 23, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.apx-back[hidden] { display: none; }
.apx-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 10px; font-size: 14px; }
.apx-x { width: 32px; height: 32px; border-radius: 10px; border: 1px solid #3b4d68; background: transparent; color: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.apx-x:hover { border-color: var(--accent, #d4af37); color: var(--accent, #d4af37); }
.apx-themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-bottom: 6px; }
.apx-th { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border-radius: 10px; border: 1px solid #3b4d68; background: transparent; color: inherit; cursor: pointer; font: inherit; font-size: 12px; text-align: start; }
.apx-th:hover, .apx-th.on { border-color: var(--accent, #d4af37); }
.apx-th.on { background: color-mix(in srgb, var(--accent, #d4af37) 14%, transparent); font-weight: 700; }
.apx-sw { flex: none; width: 28px; height: 28px; border-radius: 10px; border: 1px solid rgba(148, 163, 184, .45); }
.apx-tn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html:not(.dark) .apx-th, html:not(.dark) .apx-x { border-color: #cbd5e1; }
html:not(.dark) .apx-back { background: rgba(15, 23, 42, .35); }
@media (min-width: 520px) { .apx-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- the display options window: always in the top middle of the screen (a quarter of the way down), opens and closes with an animation, 25% see-through ---- */
html body .apx-panel { position: fixed !important; left: 50% !important; top: 25% !important; right: auto !important; bottom: auto !important; margin: 0 !important; animation: none !important;
  max-height: calc(75vh - 16px) !important; transform: translate(-50%, 0) scale(1); transform-origin: 50% 0; opacity: 1; visibility: visible;
  background: rgba(15, 27, 45, .75) !important; -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  transition: opacity .28s ease, transform .34s cubic-bezier(.2, .8, .2, 1), visibility 0s linear 0s; }
html body .apx-panel[hidden] { display: block !important; opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, -18px) scale(.96); transition: opacity .22s ease, transform .26s ease, visibility 0s linear .26s; }
html:not(.dark) body .apx-panel { background: rgba(255, 255, 255, .75) !important; }
html body .apx-back { transition: opacity .28s ease, visibility 0s linear 0s; opacity: 1; visibility: visible; }
html body .apx-back[hidden] { display: block !important; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .22s ease, visibility 0s linear .22s; }
@media (prefers-reduced-motion: reduce) { html body .apx-panel, html body .apx-back { transition: none !important; } }

/* Day mode: the theme's pale accent colours were used for small text (tags, speed-dial labels) and nearly vanished on white. The text uses a darker shade of the same colour. */
html:not(.dark):not(.night) .text-secondary:not(button):not(a) { color: color-mix(in srgb, var(--c-secondary, #b45309) 60%, #0b1220) !important; }
html:not(.dark):not(.night) .text-tertiary:not(button):not(a) { color: color-mix(in srgb, var(--c-tertiary, #7c3aed) 60%, #0b1220) !important; }

/* ---- the one appearance popup (every module): two slide switches and the theme list, under the button, top right ---- */
html body .apx-panel { left: auto !important; right: 16px !important; top: 64px !important; width: 304px !important; max-height: calc(100vh - 80px) !important; padding: 8px !important; border-radius: 16px !important;
  background: var(--surface, #fff) !important; color: var(--text, #0f172a) !important; border: 1px solid var(--border, #cbd5e1) !important; box-shadow: 0 24px 50px -20px #000000b3 !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important; transform: none !important; font-size: 14px; }
html body .apx-panel[hidden] { transform: none !important; }
html body .apx-back { background: transparent !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.apx-sws { display: flex; flex-direction: column; gap: 2px; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--border, #cbd5e1); }
.apx-swrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 12px; font: 700 15px var(--font-display, "Bricolage Grotesque", system-ui, sans-serif); }
.apx-swl { flex: 1; color: var(--text, #0f172a); opacity: .5; transition: opacity .2s; } .apx-swl:last-child { text-align: end; } .apx-swl.on { opacity: 1; }
.apx-sw2 { position: relative; flex: none; width: 52px; height: 28px; padding: 0; border-radius: 99px; border: 1px solid var(--border, #cbd5e1); background: color-mix(in srgb, var(--text, #0f172a) 12%, transparent); cursor: pointer; transition: background .2s, border-color .2s; }
.apx-sw2 i { position: absolute; top: 2px; inset-inline-start: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent, #0284c7); transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
.apx-sw2[aria-checked="true"] i { transform: translateX(24px); }
[dir="rtl"] .apx-sw2[aria-checked="true"] i { transform: translateX(-24px); }
.apx-sw2:focus-visible, .apx-th2:focus-visible { outline: 2px solid var(--accent, #0284c7); outline-offset: 2px; }
.apx-tlist { display: flex; flex-direction: column; gap: 2px; }
.apx-th2 { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 10px; border: 0; background: none; color: var(--text, #0f172a); font: 700 15px var(--font-display, "Bricolage Grotesque", system-ui, sans-serif); text-align: start; cursor: pointer; transition: background .2s; }
.apx-th2:hover { background: color-mix(in srgb, var(--text, #0f172a) 8%, transparent); }
.apx-th2[aria-checked="true"] { background: color-mix(in srgb, var(--text, #0f172a) 12%, transparent); box-shadow: inset 0 0 0 1px var(--accent, #0284c7); }
.apx-s3 { display: flex; } .apx-s3 i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid #7f7f7f66; margin-inline-start: -5px; } .apx-s3 i:first-child { margin: 0; }

.apx-sw2 { height: 28px !important; min-height: 28px !important; min-width: 52px !important; }

/* ---- the one switch style (day / night and language): a two-option pill, a sliding white thumb, a soft glow; the two sit in one row ---- */
.kx-segs { display: flex; gap: 10px; padding: 4px 4px 8px; margin-bottom: 6px; border-bottom: 1px solid var(--border, var(--till-line, #cbd5e1)); }
.kx-seg { --kx-a: var(--accent, var(--till-acc, #38bdf8)); position: relative; flex: 1 1 0; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; align-items: center; height: 40px !important; min-height: 40px !important; padding: 0 !important; border-radius: 99px;
  background: color-mix(in srgb, var(--kx-a) 16%, transparent); border: 1px solid color-mix(in srgb, var(--kx-a) 38%, transparent); cursor: pointer;
  box-shadow: 0 0 16px -2px color-mix(in srgb, var(--kx-a) 38%, transparent), inset 0 1px 0 rgba(255, 255, 255, .12); transition: box-shadow .25s; }
.kx-seg:hover { box-shadow: 0 0 22px 0 color-mix(in srgb, var(--kx-a) 50%, transparent), inset 0 1px 0 rgba(255, 255, 255, .12); }
.kx-seg:focus-visible { outline: 2px solid var(--kx-a); outline-offset: 2px; }
.kx-thumb { position: absolute; top: 3px; bottom: 3px; inset-inline-start: 3px; width: calc(50% - 3px); border-radius: 99px; background: #fff; box-shadow: 0 2px 8px rgba(8, 20, 50, .28); transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.kx-seg[aria-checked="true"] .kx-thumb { transform: translateX(100%); }
[dir="rtl"] .kx-seg[aria-checked="true"] .kx-thumb { transform: translateX(-100%); }
.kx-o { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; font: 700 13px var(--font-display, "Bricolage Grotesque", system-ui, sans-serif); color: var(--text, var(--till-mut, #475569)); opacity: .62; transition: color .2s, opacity .2s; white-space: nowrap; }
.kx-o.on { color: #14213d; opacity: 1; }
.kx-o .material-symbols-outlined { font-size: 17px; }
.kx-o.on .material-symbols-outlined { color: #f59e0b; }
.kx-o.moon.on .material-symbols-outlined { color: #4f6bd8; }

.kx-o { font-size: 12.5px; gap: 4px; } .kx-o .material-symbols-outlined { font-size: 16px; }

/* ---- the appearance popup, one calm look: a quiet track for the switches (no coloured glow), lists with a radio dot ---- */
.kx-seg { height: 44px !important; min-height: 44px !important; background: color-mix(in srgb, var(--text, var(--till-ink, #fff)) 8%, transparent) !important; border: 1px solid color-mix(in srgb, var(--text, var(--till-ink, #fff)) 14%, transparent) !important; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .28) !important; }
.kx-seg:hover { box-shadow: inset 0 2px 6px rgba(0, 0, 0, .28) !important; border-color: color-mix(in srgb, var(--text, var(--till-ink, #fff)) 28%, transparent) !important; }
.kx-thumb { top: 4px; bottom: 4px; inset-inline-start: 4px; width: calc(50% - 4px); box-shadow: 0 3px 10px -2px rgba(0, 0, 0, .5); }
.kx-o { font-size: 13.5px; }
.apx-cap { display: block; padding: 2px 4px 10px; font: 700 11px var(--font-body, "Figtree", system-ui, sans-serif); letter-spacing: .14em; text-transform: uppercase; color: var(--brand-muted, var(--till-dim, #94a3b8)); }
.kx-segs + .apx-cap { margin-top: 16px; }
.apx-th2, .tpop .apx-th2 { box-shadow: none !important; }
.apx-th2[aria-checked="true"], .tpop .apx-th2[aria-checked="true"] { background: color-mix(in srgb, var(--text, var(--till-ink, #fff)) 11%, transparent) !important; box-shadow: none !important; }
.apx-th2::after { content: ""; margin-inline-start: auto; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--text, var(--till-ink, #fff)) 38%, transparent); flex: none; }
.apx-th2[aria-checked="true"]::after { border-color: var(--accent, var(--till-acc, #38bdf8)); background: radial-gradient(circle, var(--accent, var(--till-acc, #38bdf8)) 0 4.5px, transparent 5.5px); }


/* ---- the two switches exactly as the owner's references ---- */
.kx-segs { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 2px 10px; margin-bottom: 4px; border: 0 !important; }

/* DAY MODE / NIGHT MODE: a wide pill; the day pill is blue with a yellow sun knob on the left, the night pill is dark navy with a pale moon knob on the right; rings spread from the knob */
.kx-dn { position: relative; flex: 1 1 auto; min-width: 0; height: 46px !important; min-height: 46px !important; padding: 0 !important; border-radius: 999px !important; overflow: hidden; cursor: pointer; display: block !important; text-align: start;
  border: 2px solid rgba(21, 56, 140, .55) !important; background: linear-gradient(90deg, #2c63de 0%, #4aa9ff 55%, #5ec3ff 100%) !important;
  box-shadow: inset 0 3px 7px rgba(8, 30, 90, .45), inset 0 -2px 4px rgba(255, 255, 255, .25), 0 6px 14px -8px rgba(30, 90, 220, .8) !important; transition: background .35s; font-family: "Poppins", "Bricolage Grotesque", system-ui, sans-serif; }
.kx-dn[aria-checked="true"] { border-color: rgba(8, 14, 36, .85) !important; background: linear-gradient(90deg, #1c2540 0%, #2c3a5e 55%, #3b4a72 100%) !important; box-shadow: inset 0 3px 7px rgba(0, 0, 0, .55), inset 0 -2px 4px rgba(150, 170, 230, .18), 0 6px 14px -8px rgba(0, 0, 0, .8) !important; }
.kx-dn-knob { position: absolute; top: 3px; inset-inline-start: 3px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; z-index: 2; transition: inset-inline-start .35s cubic-bezier(.16, 1, .3, 1), background .35s;
  background: radial-gradient(circle at 38% 30%, #ffe45c, #ffbf12 62%, #f0a100); box-shadow: 0 2px 6px rgba(20, 40, 100, .5), inset 0 -2px 3px rgba(190, 110, 0, .45), inset 0 2px 2px rgba(255, 255, 255, .55); }
.kx-dn-knob svg { width: 22px; height: 22px; }
.kx-dn[aria-checked="true"] .kx-dn-knob { inset-inline-start: calc(100% - 39px); background: radial-gradient(circle at 38% 30%, #f4f6ff, #cfd7f6 65%, #b6c1ec); box-shadow: 0 2px 6px rgba(0, 0, 0, .55), inset 0 -2px 3px rgba(100, 120, 190, .4), inset 0 2px 2px rgba(255, 255, 255, .7); }
.kx-dn-rings { position: absolute; top: 50%; inset-inline-start: 21px; width: 0; height: 0; z-index: 1; transition: inset-inline-start .35s cubic-bezier(.16, 1, .3, 1); }
.kx-dn[aria-checked="true"] .kx-dn-rings { inset-inline-start: calc(100% - 21px); }
.kx-dn-rings i { position: absolute; border-radius: 50%; transform: translate(-50%, -50%); border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .06); }
.kx-dn-rings i:nth-child(1) { width: 52px; height: 52px; } .kx-dn-rings i:nth-child(2) { width: 70px; height: 70px; opacity: .8; } .kx-dn-rings i:nth-child(3) { width: 92px; height: 92px; opacity: .55; }
.kx-dn[aria-checked="true"] .kx-dn-rings i { border-color: rgba(190, 205, 255, .16); background: rgba(190, 205, 255, .05); }
.kx-dn-lbl { position: absolute; top: 0; bottom: 0; display: grid; place-items: center; z-index: 1; font: 700 12.5px/1 "Poppins", "Bricolage Grotesque", system-ui, sans-serif; letter-spacing: .04em; color: #fff; white-space: nowrap; inset-inline-start: 48px; inset-inline-end: 8px; text-shadow: 0 1px 2px rgba(10, 30, 90, .35); }
.kx-dn[aria-checked="true"] .kx-dn-lbl { inset-inline-start: 10px; inset-inline-end: 48px; }
.kx-dn:focus-visible, .kx-lg:focus-visible { outline: 2px solid #8fc3ff; outline-offset: 2px; }

/* EN | AR: a pale-blue pill with a soft blue glow, the white thumb under the chosen language */
.kx-lg { position: relative; flex: 0 0 112px; width: 112px; height: 46px !important; min-height: 46px !important; padding: 0 !important; border-radius: 999px !important; cursor: pointer; display: grid !important; grid-template-columns: 1fr 1fr; align-items: center; gap: 0 !important;
  border: 1px solid rgba(110, 160, 255, .55) !important; background: linear-gradient(180deg, #e6efff, #d3e2fb) !important;
  box-shadow: 0 0 0 3px rgba(80, 140, 255, .22), 0 0 20px 2px rgba(80, 140, 255, .5), inset 0 1px 2px rgba(255, 255, 255, .9) !important; }
.kx-lg-thumb { position: absolute; top: 4px; bottom: 4px; inset-inline-start: 4px; width: calc(50% - 4px); border-radius: 999px; background: #fff; box-shadow: 0 2px 8px rgba(40, 70, 140, .28), inset 0 -1px 2px rgba(120, 150, 210, .25); transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.kx-lg[aria-checked="true"] .kx-lg-thumb { transform: translateX(100%); }
[dir="rtl"] .kx-lg[aria-checked="true"] .kx-lg-thumb { transform: translateX(-100%); }
.kx-lo { position: relative; z-index: 1; text-align: center; font: 600 14px/1 "Figtree", system-ui, sans-serif; color: #98a8c2; transition: color .2s; }
.kx-lo.on { color: #20242c; }
.tpop .kx-dn, .tpop .kx-lg, .tpop .kx-dn:hover, .tpop .kx-lg:hover, .tpop .kx-dn[aria-checked="true"], .tpop .kx-lg[aria-checked="true"] { padding: 0 !important; gap: 0 !important; }

/* icon style: one pill, four options, a sliding white thumb */
.kx-tabs { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); height: 44px; border-radius: 999px; background: color-mix(in srgb, var(--text, #fff) 8%, transparent); border: 1px solid color-mix(in srgb, var(--text, #fff) 14%, transparent); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .28); margin-bottom: 4px; }
.kx-tabs .kx-thumb { top: 4px; bottom: 4px; inset-inline-start: 4px; width: calc((100% - 8px) / 4); }
.kx-tabs:has(button:nth-of-type(2)[aria-checked="true"]) .kx-thumb { transform: translateX(100%); }
.kx-tabs:has(button:nth-of-type(3)[aria-checked="true"]) .kx-thumb { transform: translateX(200%); }
.kx-tabs:has(button:nth-of-type(4)[aria-checked="true"]) .kx-thumb { transform: translateX(300%); }
.kx-tabs button { position: relative; z-index: 1; display: grid; place-items: center; min-height: 0 !important; height: 100%; padding: 0 !important; border: 0 !important; border-radius: 999px; background: none !important; font: 700 13px var(--font-display, "Bricolage Grotesque", system-ui, sans-serif); color: var(--text, #fff); opacity: .62; box-shadow: none !important; }
.kx-tabs button[aria-checked="true"] { color: #14213d; opacity: 1; }

/* sign-in pages and the landing page: the popup is a solid pane (the tiles behind it never show through), and the icon-style pill keeps its distance from the next caption */
html body.sx .apx-panel, html body.kl-page .apx-panel { background: var(--surface, #fff) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.kx-tabs + .apx-cap { margin-top: 16px; }
