/* =========================================================
   ARON BOT — styles for index.html
   Two views: the TTS test (#playground) and API keys + docs (#api).
   Right-to-left Sorani by default; English switches the page to LTR,
   so spacing uses logical properties wherever direction matters.

   Colours come from Kurdish kilim dyes: indigo, saffron and madder red
   on undyed wool. Change colours ONLY in the token blocks below.
   ========================================================= */

/* ---------- Tokens: light (default) ---------- */
:root {
  --bg: #F1F2F6;          /* page */
  --surface: #FFFFFF;     /* cards, composer, dialog */
  --surface-2: #E7E9F1;   /* chips, hover */
  --line: #D8DBE6;
  --ink: #171D36;         /* main text */
  --ink-2: #4A5170;       /* secondary text */
  --muted: #6B7290;       /* meta text, icons */

  --indigo: #2B3A8C;      /* brand: primary buttons, selected tabs */
  --on-indigo: #FFFFFF;
  --saffron: #E3A21A;     /* the sun: logo, voice */
  --madder: #B5322E;      /* errors, stop */
  --madder-soft: #F7E3E1;
  --focus: #3D58D6;
  --link: #2B3A8C;
  --glow: rgba(227, 162, 26, 0.10);   /* behind the sun */

  /* code blocks stay on the night palette in both themes */
  --code-bg: #0B0F24;
  --code-ink: #E3E6F3;
  --code-muted: #959CBB;
  --code-line: rgba(255, 255, 255, 0.10);

  /* kilim border strip under the header */
  --kilim: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='8' viewBox='0 0 28 8'%3E%3Cpath d='M7 0l4 4-4 4-4-4z' fill='%23E3A21A'/%3E%3Cpath d='M7 2.4L8.6 4 7 5.6 5.4 4z' fill='%232B3A8C'/%3E%3Cpath d='M21 1.5l2.5 2.5-2.5 2.5-2.5-2.5z' fill='%23B5322E'/%3E%3Cpath d='M0 4h2M12 4h6M24 4h4' stroke='%232B3A8C' stroke-width='1'/%3E%3C/svg%3E");

  --font: 'Vazirmatn', 'Noto Sans Arabic', Tahoma, sans-serif;
  --display: 'Noto Naskh Arabic', 'Vazirmatn', 'Noto Sans Arabic', serif;
  --mono: ui-monospace, 'Cascadia Code', Consolas, 'Courier New', monospace;

  color-scheme: light;
}

/* ---------- Tokens: dark (system setting or explicit) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1226;
    --surface: #161B35;
    --surface-2: #1F2546;
    --line: #2A3157;
    --ink: #ECEEF7;
    --ink-2: #C3C8DD;
    --muted: #959CBB;
    --indigo: #4256C4;
    --on-indigo: #FFFFFF;
    --saffron: #F0B43A;
    --madder: #E0675F;
    --madder-soft: #3A1F2A;
    --focus: #8EA0FF;
    --link: #8EA0FF;
    --glow: rgba(66, 86, 196, 0.22);
    --code-bg: #0A0D1F;
    --kilim: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='8' viewBox='0 0 28 8'%3E%3Cpath d='M7 0l4 4-4 4-4-4z' fill='%23F0B43A'/%3E%3Cpath d='M7 2.4L8.6 4 7 5.6 5.4 4z' fill='%230E1226'/%3E%3Cpath d='M21 1.5l2.5 2.5-2.5 2.5-2.5-2.5z' fill='%23E0675F'/%3E%3Cpath d='M0 4h2M12 4h6M24 4h4' stroke='%236676D8' stroke-width='1'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1226;
  --surface: #161B35;
  --surface-2: #1F2546;
  --line: #2A3157;
  --ink: #ECEEF7;
  --ink-2: #C3C8DD;
  --muted: #959CBB;
  --indigo: #4256C4;
  --on-indigo: #FFFFFF;
  --saffron: #F0B43A;
  --madder: #E0675F;
  --madder-soft: #3A1F2A;
  --focus: #8EA0FF;
  --link: #8EA0FF;
  --glow: rgba(66, 86, 196, 0.22);
  --code-bg: #0A0D1F;
  --kilim: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='8' viewBox='0 0 28 8'%3E%3Cpath d='M7 0l4 4-4 4-4-4z' fill='%23F0B43A'/%3E%3Cpath d='M7 2.4L8.6 4 7 5.6 5.4 4z' fill='%230E1226'/%3E%3Cpath d='M21 1.5l2.5 2.5-2.5 2.5-2.5-2.5z' fill='%23E0675F'/%3E%3Cpath d='M0 4h2M12 4h6M24 4h4' stroke='%236676D8' stroke-width='1'/%3E%3C/svg%3E");
  color-scheme: dark;
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a { color: var(--link); }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  direction: ltr;
  unicode-bidi: isolate;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  padding-block: max(12px, env(safe-area-inset-top, 0px)) 18px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: var(--bg);
}
/* the kilim strip */
.topbar::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 8px;
  background: var(--kilim) repeat-x center / 28px 8px;
  opacity: 0.9;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none;
  min-width: 0;
}
.brand-mark { flex: none; width: 34px; height: 34px; color: var(--saffron); }
.brand-mark .star-core { fill: var(--indigo); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}
.brand-sub { font-size: 12px; line-height: 1.5; color: var(--muted); white-space: nowrap; }

.topbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* segmented control: view switch, language, code tabs */
.seg {
  display: inline-flex; gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.seg button {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 14px;
  border: 0; border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 14px; font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}
.seg button:hover { color: var(--ink); background: var(--surface-2); }
.seg button[aria-pressed="true"],
.seg button[aria-pressed="true"]:hover { background: var(--indigo); color: var(--on-indigo); }
.seg svg { flex: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px; font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn svg { flex: none; }
.btn--primary { background: var(--indigo); color: var(--on-indigo); }
.btn--primary:hover { filter: brightness(1.1); }
.btn--primary:disabled { filter: none; opacity: 0.75; }
.btn--quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--quiet:hover { background: var(--surface-2); }
.btn--small { min-height: 36px; padding: 0 14px; font-size: 14px; }

/* ---------- Page layout ---------- */

.page {
  flex: 1 0 auto;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding-block: 32px 48px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-bottom: max(48px, env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.page-heading { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.page-heading h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 700;
  line-height: 1.4;
  text-wrap: balance;
}
.page-heading p { margin: 0; max-width: 60ch; color: var(--ink-2); }

/* small Latin label with a kilim diamond */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.6;
  color: var(--muted);
}
.eyebrow::before,
.diamond {
  content: "";
  flex: none;
  width: 8px; height: 8px;
  background: var(--saffron);
  transform: rotate(45deg);
}

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 32px; padding: 0 14px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 13px; font-weight: 500;
}
.chip .diamond { width: 7px; height: 7px; background: var(--indigo); }

.form-error {
  margin: 0;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--madder-soft);
  color: var(--madder);
  font-size: 14px;
}

/* ---------- Composer ---------- */

.composer-form { display: flex; flex-direction: column; gap: 8px; }

.composer-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px;
  padding-inline: 8px;
  font-size: 14px; color: var(--ink-2);
}
.voice-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }

.chip-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  transition: border-color 0.15s, color 0.15s;
}
.chip-btn:hover { border-color: var(--indigo); color: var(--ink); }

.composer {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 6px 24px -14px rgba(23, 29, 54, 0.35);
  transition: border-color 0.15s;
}
.composer:focus-within { border-color: var(--indigo); }
.composer textarea {
  flex: 1 1 auto; min-width: 0;
  min-height: 116px; max-height: 320px;
  resize: none; border: 0; outline: none;
  background: transparent; color: var(--ink);
  font-size: 17px; line-height: 1.8;
  padding: 10px 14px;
}
.composer textarea::placeholder { color: var(--muted); opacity: 1; }

.send-btn {
  flex: none; width: 44px; height: 44px;
  border-radius: 50%; border: 0;
  background: var(--indigo); color: var(--on-indigo);
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.15s;
}
.send-btn:disabled { background: var(--surface-2); color: var(--muted); }
.stop-btn { background: var(--madder); color: #FFFFFF; }

.composer-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 4px 16px;
  padding-inline: 8px;
  font-size: 13px; color: var(--muted);
}
#char-count { font-variant-numeric: tabular-nums; }

/* ---------- Audio output: the sun ---------- */

.test-output {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(80% 60% at 50% 42%, var(--glow) 0%, transparent 70%),
    var(--surface);
  text-align: center;
}

.output-heading {
  width: 100%;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 4px 12px;
}
.output-heading h2 { margin: 0; font-size: 16px; font-weight: 600; }
#output-state { font-size: 13px; color: var(--muted); }

/* canvas rays + kilim star in the middle */
.sun {
  position: relative;
  width: min(240px, 62vw);
  aspect-ratio: 1;
  max-width: 100%;
  flex: none;
}
.sun canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sun-star {
  position: absolute; inset: 31%;
  color: var(--saffron);
  transition: color 0.4s, opacity 0.4s, transform 0.6s;
}
.sun-star svg { width: 100%; height: 100%; display: block; }
.sun-star .star-core { fill: var(--surface); }
[data-voice="idle"] .sun-star { opacity: 0.55; }
[data-voice="connecting"] .sun-star { color: var(--muted); animation: aron-turn 6s linear infinite; }
[data-voice="live"] .sun-star { transform: scale(1.06); }

.test-empty {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--muted); font-size: 14px;
}
.test-empty p { margin: 0; }

#player { width: 100%; max-width: 520px; accent-color: var(--indigo); }

.output-footer {
  width: 100%;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 16px;
  font-size: 13px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* little sound wave next to "default voice": moves while the voice plays */
.wave { display: inline-flex; align-items: center; gap: 2px; height: 14px; }
.wave i {
  width: 2px; height: 100%; border-radius: 2px;
  background: var(--saffron);
  transform: scaleY(0.45);
}
.wave i:nth-child(2) { transform: scaleY(0.9); }
.wave i:nth-child(3) { transform: scaleY(0.6); }
.wave i:nth-child(4) { transform: scaleY(1); }
.wave i:nth-child(5) { transform: scaleY(0.4); }
[data-voice="live"] .wave i { animation: aron-wave 0.9s ease-in-out infinite; }
[data-voice="live"] .wave i:nth-child(2) { animation-delay: 0.15s; }
[data-voice="live"] .wave i:nth-child(3) { animation-delay: 0.3s; }
[data-voice="live"] .wave i:nth-child(4) { animation-delay: 0.45s; }
[data-voice="live"] .wave i:nth-child(5) { animation-delay: 0.6s; }

/* "generating" indicator: three kilim diamonds */
.typing { display: none; gap: 7px; padding: 8px 0; }
.is-loading .typing { display: flex; }
.typing i {
  width: 9px; height: 9px;
  background: var(--saffron);
  transform: rotate(45deg);
  animation: aron-dot 1.2s ease-in-out infinite;
}
.typing i:nth-child(2) { animation-delay: 0.15s; background: var(--indigo); }
.typing i:nth-child(3) { animation-delay: 0.3s; background: var(--madder); }

/* ---------- API keys and docs ---------- */

.doc-card {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}
.doc-card h2 { margin: 0 0 6px; font-size: 17px; font-weight: 600; line-height: 1.6; }
.doc-card p { margin: 0; color: var(--ink-2); }

/* key card: kilim strip along the top edge */
.key-card {
  position: relative;
  overflow: hidden;
  padding-top: 30px;
  display: flex; flex-direction: column; gap: 14px;
}
.key-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: var(--kilim) repeat-x center / 28px 8px;
}

#create-key-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
#create-key-form label { grid-column: 1 / -1; font-size: 14px; font-weight: 600; color: var(--ink-2); }
#client-name,
#generated-key {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  transition: border-color 0.15s;
}
#client-name:focus,
#generated-key:focus { outline: none; border-color: var(--indigo); }
#client-name::placeholder { color: var(--muted); opacity: 1; }

/* spinner inside the button while the key is being created */
#create-key:disabled::before {
  content: "";
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: aron-spin 0.8s linear infinite;
}

#key-result { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
#key-result h2 { margin: 0; font-size: 17px; }
#generated-key { font-family: var(--mono); font-size: 14px; background: var(--surface-2); }

.endpoint-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.method {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--indigo);
  color: var(--on-indigo);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em;
}
.doc-card .endpoint-path { margin-top: 8px; font-family: var(--mono); font-size: 16px; }
html[dir="rtl"] .endpoint-path { text-align: right; }

.env-setup {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 14px;
  align-items: center;
  margin-top: 14px;
  direction: ltr;
}
.env-setup span { font-size: 13px; color: var(--muted); }
.env-setup code { padding: 6px 10px; overflow-x: auto; white-space: nowrap; }

.code-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--code-bg);
  color: var(--code-ink);
}
.code-title {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--code-line);
  direction: ltr;
}
.code-card .seg { background: rgba(255, 255, 255, 0.04); border-color: var(--code-line); }
.code-card .seg button { color: var(--code-muted); min-height: 32px; font-size: 13px; }
.code-card .seg button:hover { background: rgba(255, 255, 255, 0.08); color: var(--code-ink); }
.code-card .seg button[aria-pressed="true"] { background: var(--saffron); color: #1A1405; }

.text-button {
  min-height: 36px; padding: 0 14px;
  border: 1px solid var(--code-line); border-radius: 999px;
  background: transparent;
  color: var(--code-ink);
  font-size: 13px;
  transition: background-color 0.15s;
}
.text-button:hover { background: rgba(255, 255, 255, 0.08); }

.example-note { margin: 0; padding: 12px 18px 0; font-size: 13px; color: var(--code-muted); }
.code-card pre {
  margin: 0;
  padding: 14px 18px 18px;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.65;
  tab-size: 4;
}
.code-card pre + pre { border-top: 1px dashed var(--code-line); }
.code-card pre code { padding: 0; background: none; font-size: inherit; color: inherit; }
.code-note { margin: 0; padding: 0 18px 14px; font-size: 12px; color: var(--code-muted); direction: ltr; text-align: left; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
th { font-size: 13px; font-weight: 600; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }
td { color: var(--ink-2); }

.docs-foot { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- Settings dialog ---------- */

dialog {
  width: min(440px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 60px -24px rgba(11, 15, 36, 0.55);
  overflow: hidden;
}
dialog::backdrop { background: rgba(11, 15, 36, 0.55); }

#settings-form {
  position: relative;
  display: flex; flex-direction: column; gap: 16px;
  padding: 30px 22px 22px;
}
#settings-form::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: var(--kilim) repeat-x center / 28px 8px;
}

.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dialog-heading h2 { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.5; }
.close-btn {
  flex: none;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--ink-2);
}
.close-btn:hover { background: var(--surface-2); color: var(--ink); }

.settings-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.settings-row label {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 14px; color: var(--ink-2);
}
.settings-row output { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.settings-row input,
.settings-row select { grid-column: 1 / -1; }
#speed { width: 100%; accent-color: var(--saffron); }
#format {
  min-height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg); color: var(--ink);
  font-size: 15px;
}

.check-label { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.check-label input { width: 18px; height: 18px; accent-color: var(--indigo); }
.field-note { margin: -8px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- Animations ---------- */

@keyframes aron-dot {
  0%, 80%, 100% { opacity: 0.3; transform: rotate(45deg) scale(0.8); }
  40% { opacity: 1; transform: rotate(45deg) scale(1.1); }
}
@keyframes aron-wave { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }
@keyframes aron-spin { to { transform: rotate(360deg); } }
@keyframes aron-turn { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .typing i, .wave i, .sun-star, #create-key:disabled::before { animation: none !important; }
}

/* ---------- Phones ---------- */

@media (max-width: 640px) {
  .brand-sub { display: none; }
  .hide-narrow { display: none; }
  .btn--icon-narrow { width: 44px; padding: 0; }
  .seg button { padding: 0 11px; font-size: 13px; }
}

@media (max-width: 560px) {
  .brand-name { font-size: 19px; }
  /* the header wraps to three rows here: too tall to keep pinned */
  .topbar { position: relative; }
  .topbar-actions { width: 100%; justify-content: space-between; }
  .page { padding-block: 24px 40px; gap: 18px; }
  .composer textarea { font-size: 16px; }
  .test-output { padding: 16px; border-radius: 22px; }
  #create-key-form { grid-template-columns: 1fr; }
  .settings-row { grid-template-columns: 1fr; }
  .env-setup { grid-template-columns: 1fr; gap: 4px; }
}

/* =========================================================
   ARON FUND THEME — matches aronfund.com
   Night background, gold primary, cyan accent, 18px cards,
   8px buttons, Unbounded display + Noto Sans Arabic / Inter body.
   ========================================================= */
:root:root:root {
  --bg: #03060D;
  --bg-2: #091522;
  --surface: #0B1826;
  --surface-2: #12253A;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.24);
  --ink: #F7FAFF;
  --ink-2: #C0CCDA;
  --muted: #93A3B8;

  --indigo: #FFB43F;        /* primary action = Aron Fund gold */
  --on-indigo: #251500;
  --saffron: #FFB43F;
  --cyan: #36D7E8;
  --cyan-soft: #9BEEF5;
  --madder: #FF7A7A;
  --madder-soft: rgba(255, 122, 122, 0.12);
  --focus: #36D7E8;
  --link: #36D7E8;
  --glow: rgba(54, 215, 232, 0.12);

  --code-bg: #050B14;
  --code-ink: #E3F4F8;
  --code-muted: #93A3B8;
  --code-line: rgba(255, 255, 255, 0.10);

  --font: 'Noto Sans Arabic', 'Inter', system-ui, sans-serif;
  --display: 'Unbounded', 'Noto Sans Arabic', 'Inter', sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  --radius: 18px;
  --radius-btn: 8px;

  color-scheme: dark;
}

body {
  background:
    radial-gradient(70% 45% at 85% 0%, rgba(82, 117, 255, 0.10), transparent 70%),
    radial-gradient(60% 40% at 10% 10%, rgba(54, 215, 232, 0.06), transparent 70%),
    var(--bg);
  line-height: 1.75;
}

/* header: translucent night bar with a hairline, like aronfund.com */
.topbar {
  background: rgba(3, 6, 13, 0.92);
  border-bottom: 1px solid var(--line);
  padding-block: 14px;
}
.topbar::after { display: none; }
.brand-mark { color: var(--saffron); }
.brand-mark .star-core { fill: var(--bg); }
.brand-name { font-family: var(--display); font-weight: 800; color: var(--ink); }

/* segmented controls: dark pill group, 8px items, white-tint active */
.seg {
  border-color: var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}
.seg button { border-radius: var(--radius-btn); font-weight: 700; font-size: 13px; color: #C4D0DC; }
.seg button:hover { background: rgba(255, 255, 255, 0.06); color: #FFFFFF; }
.seg button[aria-pressed="true"],
.seg button[aria-pressed="true"]:hover { background: rgba(255, 255, 255, 0.10); color: #FFFFFF; }

/* buttons */
.btn { border-radius: var(--radius-btn); font-weight: 800; }
.btn--primary { background: var(--saffron); color: var(--on-indigo); }
.btn--quiet { background: rgba(255, 255, 255, 0.05); color: #FFFFFF; border-color: var(--line-strong); }
.btn--quiet:hover { background: rgba(255, 255, 255, 0.10); }

/* headings */
.page-heading h1 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.35;
  color: #E3F4F8;
}
.dialog-heading h2 { font-family: var(--display); font-weight: 800; }

/* eyebrow: cyan mono label with a thin divider, like "01 | ARON FUND · ERBIL" */
.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px; font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--cyan-soft);
}
.eyebrow::before {
  width: 1px; height: 14px;
  background: var(--cyan);
  transform: none;
  border-radius: 0;
}
.diamond { background: var(--cyan); }

.chip { border-radius: var(--radius-btn); background: rgba(54, 215, 232, 0.10); color: var(--cyan-soft); border: 1px solid rgba(54, 215, 232, 0.25); }
.chip .diamond { background: var(--cyan); }
.form-error { border-radius: 12px; }

/* composer */
.chip-btn { border-radius: var(--radius-btn); background: rgba(255, 255, 255, 0.04); border-color: var(--line); color: var(--ink-2); }
.chip-btn:hover { border-color: var(--cyan); color: var(--ink); }
.composer {
  border-color: var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.24);
}
.composer:focus-within { border-color: var(--cyan); }
.send-btn { border-radius: 12px; background: var(--saffron); color: var(--on-indigo); }
.send-btn:disabled { background: rgba(255, 255, 255, 0.06); color: var(--muted); }
.stop-btn { background: var(--madder); color: #2A0A0A; }

/* audio output card */
.test-output {
  border-color: var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(70% 60% at 50% 40%, var(--glow) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-2), var(--surface));
}
.output-heading h2 { font-weight: 700; }
.sun-star .star-core { fill: var(--bg-2); }
#player { accent-color: var(--saffron); }
.typing i:nth-child(2) { background: var(--cyan); }
.typing i:nth-child(3) { background: #5275FF; }

/* docs cards */
.doc-card { border-color: var(--line); border-radius: var(--radius); background: var(--surface); }
.doc-card h2 { font-weight: 700; color: var(--ink); }
.key-card::before {
  height: 3px;
  background: linear-gradient(90deg, var(--saffron), var(--cyan) 55%, #5275FF);
}
#client-name,
#generated-key { border-radius: 10px; background: var(--bg); border-color: var(--line); }
#client-name:focus,
#generated-key:focus { border-color: var(--cyan); }
#generated-key { background: var(--bg-2); }

.method {
  border-radius: 6px;
  background: rgba(54, 215, 232, 0.12);
  color: var(--cyan-soft);
  border: 1px solid rgba(54, 215, 232, 0.30);
  font-family: var(--mono);
  font-weight: 800;
}
.doc-card .endpoint-path { color: #E3F4F8; }

code { background: rgba(255, 255, 255, 0.06); color: #E3F4F8; }
.code-card { border-color: var(--line); border-radius: var(--radius); }
.code-card .seg { border-radius: 10px; }
.code-card .seg button[aria-pressed="true"] { background: var(--saffron); color: var(--on-indigo); }
.text-button { border-radius: var(--radius-btn); font-weight: 700; }

th { color: var(--cyan-soft); font-family: var(--mono); font-weight: 800; letter-spacing: 0.06em; }

/* settings dialog */
dialog {
  border-color: var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.45);
}
dialog::backdrop { background: rgba(3, 6, 13, 0.72); }
#settings-form::before {
  height: 3px;
  background: linear-gradient(90deg, var(--saffron), var(--cyan) 55%, #5275FF);
}
.close-btn { border-radius: 10px; border-color: var(--line); }
.close-btn:hover { background: rgba(255, 255, 255, 0.08); }
#format { border-radius: 10px; background: var(--bg); border-color: var(--line); }
.check-label input { accent-color: var(--saffron); }

/* ---------- Aron Fund LIGHT theme: add class "theme-light" on the wrapper ---------- */
.logo-ink { fill: #F7FAFF; }
:root:root:root.theme-light {
  --bg: #F4F7FB;
  --bg-2: #EAF0F6;
  --surface: #FFFFFF;
  --surface-2: #EAF0F6;
  --line: #CBD7E2;
  --line-strong: #B5C4D3;
  --ink: #07111E;
  --ink-2: #3A4A5E;
  --muted: #5B6B80;
  --cyan-soft: #0B7F8C;
  --madder: #C93C3C;
  --madder-soft: #FCEBEB;
  --focus: #0B7F8C;
  --link: #0B7F8C;
  --glow: rgba(54, 215, 232, 0.20);
  color-scheme: light;
  background: var(--bg);
  color: var(--ink);
}
.theme-light .logo-ink { fill: #07111E; }
.theme-light .topbar { background: rgba(244, 247, 251, 0.92); }
.theme-light .seg { background: #FFFFFF; }
.theme-light .seg button { color: var(--ink-2); }
.theme-light .seg button:hover { background: var(--surface-2); color: var(--ink); }
.theme-light .seg button[aria-pressed="true"],
.theme-light .seg button[aria-pressed="true"]:hover { background: #07111E; color: #FFFFFF; }
.theme-light .code-card .seg { background: rgba(255, 255, 255, 0.04); }
.theme-light .code-card .seg button { color: var(--code-muted); }
.theme-light .code-card .seg button[aria-pressed="true"] { background: var(--saffron); color: var(--on-indigo); }
.theme-light .btn--quiet { background: #FFFFFF; color: var(--ink); border-color: var(--line-strong); }
.theme-light .btn--quiet:hover { background: var(--surface-2); }
.theme-light .page-heading h1 { color: var(--ink); }
.theme-light .chip { background: rgba(11, 127, 140, 0.08); border-color: rgba(11, 127, 140, 0.25); }
.theme-light .chip-btn { background: #FFFFFF; }
.theme-light .composer { box-shadow: 0 18px 40px -20px rgba(7, 17, 30, 0.18); }
.theme-light .test-output {
  background:
    radial-gradient(70% 60% at 50% 40%, var(--glow) 0%, transparent 70%),
    linear-gradient(180deg, #FFFFFF, #F4F7FB);
}
.theme-light .doc-card h2,
.theme-light .doc-card .endpoint-path { color: var(--ink); }
.theme-light code { background: var(--surface-2); color: var(--ink); }
.theme-light .method { background: rgba(11, 127, 140, 0.08); color: #0B7F8C; border-color: rgba(11, 127, 140, 0.30); }
.theme-light dialog { box-shadow: 0 22px 56px rgba(7, 17, 30, 0.18); }
.theme-light .close-btn:hover { background: var(--surface-2); }

.theme-toggle { width: 44px; min-width: 44px; padding: 0; justify-content: center; }

/* ---------- Account pages: sign up, log in, profile ---------- */
.auth-page { max-width: 480px; justify-content: center; padding-block: 56px 64px; }
.auth-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 18px;
  padding: 34px 26px 26px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.24);
}
.theme-light .auth-card { box-shadow: 0 22px 56px -24px rgba(7, 17, 30, 0.22); }
.auth-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--saffron), var(--cyan) 55%, #5275FF);
}
.auth-card .page-heading h1 { font-size: 28px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.field-label a { font-size: 13px; font-weight: 500; text-decoration: none; }
.input {
  width: 100%; min-height: 48px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink);
  font-size: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: var(--muted); opacity: 1; }
.input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(54, 215, 232, 0.15); }
.input-wrap { position: relative; }
.input-wrap .input { padding-inline-end: 52px; }
.input-icon-btn {
  position: absolute; inset-block: 2px; inset-inline-end: 2px;
  width: 44px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted);
  display: grid; place-items: center;
}
.input-icon-btn:hover { color: var(--ink); }
.field-hint { margin: 0; font-size: 13px; color: var(--muted); }
.btn--block { width: 100%; min-height: 48px; font-size: 16px; }
.auth-switch { margin: 0; text-align: center; font-size: 14px; color: var(--ink-2); }
.auth-switch a { font-weight: 700; text-decoration: none; }
.divider { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* profile */
.profile-page { max-width: 960px; }
.profile-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
.profile-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.avatar {
  flex: none; width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--saffron), #F08A24);
  color: #251500; font-size: 22px; font-weight: 800;
}
.profile-name { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.5; }
.profile-email { margin: 0; font-size: 14px; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stat {
  padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
.stat-label { margin: 0; font-size: 13px; color: var(--muted); }
.stat-value { margin: 2px 0 0; font-family: 'Unbounded', var(--font); font-size: 26px; font-weight: 800; color: var(--ink); direction: ltr; text-align: start; }
.stat-sub { margin: 0; font-size: 12px; color: var(--muted); }
.keys-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
}
.keys-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
}
.keys-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.create-row { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.create-row .input { flex: 1 1 240px; background: var(--surface); }
.new-key {
  display: flex; flex-direction: column; gap: 10px;
  margin: 16px 22px 0; padding: 14px 16px;
  border: 1px solid rgba(255, 180, 63, 0.45); border-radius: 12px;
  background: rgba(255, 180, 63, 0.08);
}
.new-key p { margin: 0; font-size: 14px; color: var(--ink-2); }
.new-key-row { display: flex; flex-wrap: wrap; gap: 8px; }
.new-key-row .input { flex: 1 1 260px; font-family: var(--mono); font-size: 14px; direction: ltr; background: var(--surface); }
.key-list { list-style: none; margin: 0; padding: 6px 0; }
.key-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
.key-row:last-child { border-bottom: 0; }
.key-main { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.key-name { margin: 0; font-size: 16px; font-weight: 700; }
.key-mask { font-family: var(--mono); font-size: 13px; color: var(--muted); direction: ltr; text-align: start; }
.key-usage { flex: 1 1 240px; display: flex; flex-direction: column; gap: 6px; }
.usage-nums { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); }
.usage-nums b { color: var(--ink); font-variant-numeric: tabular-nums; }
.usage-bar { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.usage-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--saffron), var(--cyan)); }
.key-meta { flex: 0 1 150px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.key-actions { flex: none; display: flex; align-items: center; gap: 8px; }
.btn--danger { background: transparent; color: var(--madder); border-color: rgba(255, 122, 122, 0.45); }
.btn--danger:hover { background: var(--madder-soft); }
.btn--danger-solid { background: var(--madder); color: #FFFFFF; font-weight: 800; }
.theme-light .btn--danger { border-color: rgba(201, 60, 60, 0.4); }
.confirm-text { font-size: 13px; color: var(--madder); font-weight: 700; }
.empty-keys { margin: 0; padding: 28px 22px; text-align: center; color: var(--muted); }
.nav-link { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 8px; text-decoration: none; }
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: 1fr; }
}


/* =========================================================
   SITE ADDITIONS — language fonts, header links, theme toggle,
   voice orb + player
   ========================================================= */
html:root:root:root[lang="en"] { --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; }
html[lang="en"] .brand-name { font-family: 'Unbounded', 'Inter', sans-serif; }
html[dir="ltr"] .endpoint-path { text-align: left; }

/* nav links that look like the segmented buttons */
.seg a {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 14px;
  border-radius: var(--radius-btn);
  color: #C4D0DC; font-size: 13px; font-weight: 700;
  text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}
.seg a:hover { background: rgba(255, 255, 255, 0.06); color: #FFFFFF; }
.seg a[aria-current="page"] { background: rgba(255, 255, 255, 0.10); color: #FFFFFF; }
.theme-light .seg a { color: var(--ink-2); }
.theme-light .seg a:hover { background: var(--surface-2); color: var(--ink); }
.theme-light .seg a[aria-current="page"] { background: #07111E; color: #FFFFFF; }

/* theme toggle: sun in dark mode, moon in light mode */
.theme-toggle .icon-moon { display: none; }
.theme-light .theme-toggle .icon-sun { display: none; }
.theme-light .theme-toggle .icon-moon { display: inline; }

.account-link { text-decoration: none; }

.form-error:empty { display: none; }

/* ---------- Voice orb (replaces the sun) ---------- */
.vo { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.vo-stage { position: relative; width: 280px; height: 280px; max-width: 78vw; max-height: 78vw; display: grid; place-items: center; }
.vo-ring { position: absolute; left: 50%; top: 50%; width: 140px; height: 140px; margin: -70px 0 0 -70px; border-radius: 50%; border: 1px solid rgba(54, 215, 232, 0.55); opacity: 0; }
.vo-rays { position: absolute; inset: 0; }
.vo-ray { position: absolute; left: 50%; top: calc(50% - 26px); width: 3px; height: 26px; margin-left: -1.5px; transform-origin: 50% 100%; }
.vo-ray i { display: block; width: 100%; height: 100%; border-radius: 3px; background: linear-gradient(to top, var(--saffron), var(--cyan)); transform-origin: 50% 100%; transform: scaleY(0.18); opacity: 0.45; transition: opacity 0.3s; }
.vo-halo { position: absolute; left: 50%; top: 50%; width: 136px; height: 136px; margin: -68px 0 0 -68px; border-radius: 50%; background: conic-gradient(from 0deg, #FFB43F, #36D7E8, #5275FF, #FFB43F); opacity: 0.85; animation: vo-spin 6s linear infinite; animation-play-state: paused; }
.vo-core { position: relative; width: 124px; height: 124px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #12253A, #060D18 75%); display: grid; place-items: center; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.vo-core svg { width: 54px; height: 46px; }
.vo-glow { position: absolute; left: 50%; top: 50%; width: 220px; height: 220px; margin: -110px 0 0 -110px; border-radius: 50%; background: radial-gradient(circle, rgba(54, 215, 232, 0.18), transparent 65%); opacity: 0.4; transition: opacity 0.4s; }

[data-voice="live"] .vo-ring { animation: vo-ripple 2.4s cubic-bezier(.2, .6, .3, 1) infinite; }
[data-voice="live"] .vo-ring:nth-child(3) { animation-delay: 0.8s; }
[data-voice="live"] .vo-ring:nth-child(4) { animation-delay: 1.6s; }
[data-voice="live"] .vo-ray i { opacity: 1; }
[data-voice="live"] .vo-halo { animation-play-state: running; }
[data-voice="live"] .vo-glow { opacity: 1; animation: vo-breathe 1.8s ease-in-out infinite; }
[data-voice="live"] .vo-core svg { animation: vo-beat 1.2s ease-in-out infinite; }
[data-voice="connecting"] .vo-halo { animation-play-state: running; animation-duration: 1.2s; background: conic-gradient(from 0deg, transparent 0 55%, #36D7E8 80%, #FFB43F); }
[data-voice="connecting"] .vo-core svg { animation: vo-dim 1.2s ease-in-out infinite; }
/* no Web Audio: the rays dance on their own */
.vo--css[data-voice="live"] .vo-ray i, [data-voice="live"] .vo--css .vo-ray i { animation: vo-eq var(--d, 1s) ease-in-out var(--dl, 0s) infinite alternate; }

.theme-light .vo-core { background: radial-gradient(circle at 50% 35%, #FFFFFF, #EAF0F6 75%); box-shadow: 0 0 0 1px rgba(7, 17, 30, 0.08), 0 18px 40px rgba(7, 17, 30, 0.15), inset 0 1px 0 #FFFFFF; }
.theme-light .vo-glow { background: radial-gradient(circle, rgba(54, 215, 232, 0.28), transparent 65%); }

/* custom player */
.vo-player { width: min(560px, 100%); display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.03); direction: ltr; }
.vo-player[hidden] { display: none !important; }
.vo-play { flex: none; width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--saffron); color: var(--on-indigo); display: grid; place-items: center; transition: transform 0.15s, filter 0.15s; }
.vo-play:hover { filter: brightness(1.08); }
.vo-play:active { transform: scale(0.96); }
.vo-play .icon-pause { display: none; }
.vo-play[aria-pressed="true"] .icon-play { display: none; }
.vo-play[aria-pressed="true"] .icon-pause { display: block; }
.vo-wave { flex: 1; min-width: 0; height: 36px; display: flex; align-items: center; gap: 3px; padding: 0; border: 0; background: none; cursor: pointer; }
.vo-wave i { flex: 1; min-width: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.22); transition: background-color 0.15s; }
.vo-wave i.is-played { background: linear-gradient(to top, var(--saffron), var(--cyan)); }
.vo-time { flex: none; font: 600 13px/1 Inter, system-ui, sans-serif; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.vo-dl { flex: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.05); color: var(--ink); display: grid; place-items: center; }
.vo-dl:hover { background: rgba(255, 255, 255, 0.10); }
.theme-light .vo-player { background: #FFFFFF; }
.theme-light .vo-wave i:not(.is-played) { background: rgba(7, 17, 30, 0.14); }
.theme-light .vo-dl { background: #FFFFFF; }
.audio-details { margin: 0; font-size: 13px; color: var(--muted); }

@keyframes vo-eq { from { transform: scaleY(0.2); } to { transform: scaleY(1); } }
@keyframes vo-ripple { 0% { transform: scale(0.9); opacity: 0.7; } 100% { transform: scale(2); opacity: 0; } }
@keyframes vo-spin { to { transform: rotate(360deg); } }
@keyframes vo-breathe { 50% { transform: scale(1.08); } }
@keyframes vo-beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes vo-dim { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) {
  .vo *, .vo-halo { animation: none !important; }
}
html[dir="ltr"] .icon-logout { transform: scaleX(-1); }
