/* Roxyon AI front page (ai.roxyon.com, D-20261027-04): the console's colours; the engine's styles (css/agent.css,
   copied from the console) read the variables below. */
:root {
    /* The console's look (D-20261027-04): its dark greys, its red (--color-primary) and Open Sans. */
    --bg: #141414;
    --surface: #1c1c1e;
    --surface2: #262628;
    --line: #2f2f2f;
    --text: #e8e8e8;
    --muted: #8a8a8a;
    --brand: #d50c2d;
    --brand-light: #ff5a74;
    --action: #d50c2d;
    --danger: #F26B6B;
    --color-primary: #d50c2d;
    --color-primary--hover: #b00a25;
    --color-primary--link: #ff5a74;
    --color-border: #2f2f2f;
    --color-border--dark: #2f2f2f;
    --color-text: #e8e8e8;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
/* No browser pull-to-reload (owner 2026-10-25): the chat list has its own pull-to-refresh. */
html, body { overscroll-behavior-y: none; }
body { font: 15px/1.5 "Open Sans", Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
[dir="rtl"] body, html[dir="rtl"] body { font-family: Almarai, Inter, system-ui, sans-serif; }
a { color: var(--brand-light); }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---- shared bits ---- */
.ai-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; padding: 0 20px; background: #383838; }
.ai-brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 18px; }
.ai-brand img { border-radius: 0; }
.ai-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--action); color: #fff; font-weight: 600; text-decoration: none; }
.ai-btn:hover { background: var(--color-primary--hover); }
.ai-btn:disabled { opacity: .6; cursor: default; }
.ai-btn--small { min-height: 38px; padding: 0 14px; border-radius: 8px; font-size: 14px; }
.ai-btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.ai-link { background: none; border: 0; color: var(--action); padding: 8px; }
.ai-err { color: var(--danger); margin: 8px 0; }
.iconify { display: inline-block; width: 1.2em; height: 1.2em; vertical-align: -.2em; }

/* ---- trial ---- */
.ai-trial { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.ai-trial-main { flex: 1; width: 100%; max-width: 820px; margin: 0 auto; padding: 0 16px; }
.ai-hero { text-align: center; padding: 20px 0 12px; }
.ai-hero-mark { border-radius: 16px; padding: 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 0 40px rgba(213, 12, 45, .25); }
.ai-hero h1 { font-size: 26px; line-height: 1.25; margin: 18px 0 8px; }
.ai-hero p { color: var(--muted); margin: 0 auto 22px; max-width: 560px; font-size: 16px; }
.ai-foot { font-size: 12px !important; margin-top: 18px !important; }
.ai-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; text-align: start; }
.ai-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 8px; }
.ai-card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ai-card-h .iconify { color: var(--brand-light); }
.ai-starter { display: flex; align-items: flex-start; gap: 6px; width: 100%; padding: 5px 2px; background: none; border: 0; border-radius: 8px; color: var(--muted); font-size: 13.5px; text-align: start; }
.ai-starter:hover { color: var(--text); background: var(--surface2); }
.ai-starter .iconify { flex: none; margin-top: 2px; font-size: 13px; }
[dir="rtl"] .ai-starter .iconify { transform: scaleX(-1); }
.ai-log { display: flex; flex-direction: column; gap: 6px; padding: 12px 0 20px; }
.ai-msg { max-width: 100%; line-height: 1.55; overflow-wrap: anywhere; }
.ai-msg--me { align-self: flex-end; max-width: 82%; background: var(--surface2); padding: 10px 14px; border-radius: 18px; white-space: pre-wrap; }
.ai-msg--ai { padding: 6px 2px; }
.ai-msg--ai p { margin: 0 0 10px; }
.ai-msg--ai ul { margin: 0 0 10px; padding-inline-start: 22px; }
.ai-msg--ai h4 { margin: 12px 0 6px; font-size: 15px; }
.ai-msg--ai blockquote { margin: 0 0 8px; padding: 2px 12px; border-inline-start: 3px solid var(--line); color: var(--text); }
.ai-msg--ai hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.ai-msg--ai code { background: var(--surface2); padding: 1px 5px; border-radius: 5px; }
.ai-thinking { color: var(--muted); padding: 6px 2px; animation: aipulse 1.2s ease-in-out infinite alternate; }
@keyframes aipulse { from { opacity: .45; } to { opacity: 1; } }
.ai-signcard { margin: 4px 0 10px; padding: 14px; background: var(--surface); border: 1px solid rgba(213, 12, 45, .6); border-radius: 14px; }
.ai-signcard p { margin: 0 0 10px; }
.ai-composer { position: sticky; bottom: 0; background: var(--bg); padding: 6px 12px calc(8px + env(safe-area-inset-bottom)); }
.ai-box { display: flex; align-items: flex-end; gap: 4px; max-width: 820px; margin: 0 auto; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.ai-box textarea { flex: 1; min-height: 40px; max-height: 180px; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; padding: 9px 6px; }
.ai-box textarea::placeholder { color: var(--muted); }
.ai-ico { flex: none; width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 20px; }
.ai-ico:hover { color: var(--text); }
.ai-send { flex: none; width: 40px; height: 40px; border: 0; border-radius: 8px; background: var(--action); color: #fff; font-size: 20px; }
.ai-left { text-align: center; color: var(--muted); font-size: 12px; margin-top: 6px; }

/* ---- sign-in dialog ---- */
.ai-dialog { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.ai-sheet { position: relative; width: 100%; max-width: 420px; padding: 24px 20px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 60px -12px rgba(0,0,0,.6); text-align: center; display: flex; flex-direction: column; gap: 10px; }
.ai-sheet img { margin: 0 auto 4px; border-radius: 14px; }
.ai-sheet h2 { margin: 4px 0 0; font-size: 18px; font-weight: 600; }
.ai-sheet p { margin: 0 0 6px; color: var(--muted); }
.ai-sheet input { width: 100%; height: 50px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--surface2); color: var(--text); font: inherit; font-size: 16px; text-align: center; outline: 0; }
.ai-sheet input#ai-code { font-size: 24px; letter-spacing: 8px; }
.ai-sheet small { color: var(--muted); }
.ai-close { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 5; width: 36px; height: 36px; border: 0; border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 20px; }

/* ---- signed in: the engine's page, full height, Roxyon AI colours ---- */
#ai-app .rxp { height: 100vh; height: 100dvh; --rxp-bg: #0B1020; --rxp-side: #10162A; --rxp-line: #2A3355; --rxp-text: #E8ECF8; --rxp-muted: #8E98B8; --rxp-bubble: #1C2440; --rxp-field: #1C2440; }
#ai-app .rxp-modes, #ai-app #rxp-mode-hint { display: none !important; }
.ai-side-mark { border-radius: 7px; }
.ai-me { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); margin-top: auto; }
.ai-me-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.ai-me-link span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--surface2); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.ai-welcome { display: flex; align-items: center; gap: 10px; margin: 8px 16px 0; padding: 10px 14px; background: var(--surface); border: 1px solid rgba(213, 12, 45, .6); border-radius: 14px; }
.ai-welcome > span:not(.iconify) { flex: 1; }
.ai-welcome .iconify { color: var(--brand-light); font-size: 20px; }
.ai-empty { padding: 28px 16px 8px; text-align: center; overflow-y: auto; }
.ai-empty-mark { width: 52px; height: 52px; border-radius: 13px; box-shadow: 0 0 34px rgba(142, 5, 194, .4); }
.ai-empty h2 { margin: 14px 0 16px; font-size: 22px; font-weight: 600; }
.ai-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 20px; }
.ai-chip { padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface2); }
.ai-chip:hover { border-color: var(--brand-light); }
.ai-cards--app { max-width: 820px; margin: 0 auto; }
#ai-app .rxp-log.ai-log-empty { flex: 0 0 auto; min-height: 0; }
#ai-app .rxp-log.ai-log-empty .rxa-msg--note:not(.rxa-msg--error) { display: none; }

/* ---- account ---- */
.ac-main { max-width: 720px; margin: 0 auto; padding: 8px 16px 40px; }
.ac-main h1 { font-size: 26px; margin: 8px 0 16px; }
.ac-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 14px; }
.ac-card h3 { margin: 0 0 10px; font-size: 15px; color: var(--muted); font-weight: 600; }
.ac-big { font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.ac-big--sm { font-size: 24px; }
.ac-rows > div, .ac-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ac-rows > div:last-child, .ac-list > div:last-child { border-bottom: 0; }
.ac-rows span, .ac-list span { color: var(--muted); }
.ac-list { max-height: 360px; overflow-y: auto; font-size: 14px; }
.ac-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ac-muted { color: var(--muted); margin: 0 0 10px; }
.ac-auto { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ac-auto select { height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); font: inherit; }

@media (max-width: 600px) {
    .ai-hero h1 { font-size: 22px; }
    .ai-cards { grid-template-columns: 1fr; }
}

/* ---- custom assistants ---- */
.ai-asst { padding: 6px 10px 2px; border-bottom: 1px solid var(--line); }
.ai-asst-h { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 4px 4px 6px; }
.ai-asst-add { width: 26px; height: 26px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 16px; }
.ai-asst-add:hover { background: var(--surface2); color: var(--text); }
.ai-asst-row { display: flex; align-items: center; }
.ai-asst-item { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 7px 6px; border: 0; border-radius: 10px; background: transparent; text-align: start; }
.ai-asst-item span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-asst-item .iconify { color: var(--brand-light); flex: none; }
.ai-asst-item:hover { background: var(--surface2); }
.ai-asst-item--new { color: var(--muted); margin-bottom: 4px; }
.ai-asst-edit { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); opacity: .7; }
.ai-asst-edit:hover { opacity: 1; background: var(--surface2); }
.ai-make { display: flex; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 2px 2px; border: 0; border-top: 1px solid var(--line); width: 100%; background: transparent; color: var(--brand-light); font-size: 13px; text-align: start; }
.ai-sheet--form { text-align: start; max-height: calc(100dvh - 32px); overflow-y: auto; }
.ai-sheet--form h2 { margin-bottom: 6px; }
.ai-sheet--form label { font-size: 13px; color: var(--muted); margin-top: 4px; }
.ai-sheet--form input, .ai-sheet--form select, .ai-sheet--form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface2); color: var(--text); font: inherit; font-size: 15px; text-align: start; height: auto; }
.ai-sheet--form textarea { resize: vertical; min-height: 120px; }
.ai-arow { display: flex; gap: 10px; }
.ai-arow > div { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.ai-link--danger { color: var(--danger); }
/* Trial: free website preview card (2026-10-26). */
.ai-signcard .ai-btn + .ai-btn, .ai-signcard a.ai-btn { margin-right: 8px; }
.ai-signcard a.ai-btn { display: inline-block; text-decoration: none; }
.ai-signcard .ai-muted { color: var(--muted); font-size: 13px; margin: 10px 0; }
.ai-pvmail { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.ai-pvmail input { flex: 1 1 200px; min-width: 0; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; }
.ai-pvmail .ai-muted { flex-basis: 100%; margin: 0; }

/* Chat vs assistant (D-20261026-03) */
.ai-roles { max-width: 560px; margin: -6px auto 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.ai-roles-link { border: 0; background: none; padding: 0; color: var(--brand-light); font-weight: 600; text-decoration: underline; }
.ai-asst-hint { color: var(--muted); font-size: 12.5px; line-height: 1.45; padding: 0 4px 6px; }
.ai-aintro { margin: 0 0 6px !important; font-size: 13.5px; line-height: 1.5; color: var(--muted); }

/* Front page: what it does + plans (D-20261027-04). */
.ai-does-h { font-size: 18px; font-weight: 600; margin: 34px 0 14px; }
.ai-does { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; text-align: start; }
.ai-does-i { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.ai-does-i .iconify { flex: none; font-size: 22px; color: var(--brand); margin-top: 2px; }
.ai-does-i b { display: block; font-size: 14px; margin-bottom: 3px; }
.ai-does-i span:not(.iconify) { color: var(--muted); font-size: 13px; line-height: 1.5; }
.ai-plans { margin: 22px auto 0 !important; max-width: 620px; color: var(--muted); font-size: 13.5px !important; }
