@font-face {
  font-family: Vazir;
  src: url("./fonts/Vazir-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Vazir;
  src: url("./fonts/Vazir-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  font-family: Vazir, Tahoma, "Segoe UI", Arial, sans-serif;
  --background: #0b1419;
  --panel: #14222a;
  --field: #101d24;
  --border: #2b4049;
  --text: #edf5f4;
  --soft: #b0c4c6;
  --accent: #86e3c8;
  --accent-ink: #09261e;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 75% 4%, #183139 0, transparent 42%), var(--background); color: var(--text); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.shell { width: min(100% - 48px, 1050px); margin-inline: auto; }
header { display: flex; align-items: center; justify-content: space-between; padding: 25px 0; border-bottom: 1px solid var(--border); }
.brand, .header-tools { display: flex; align-items: center; gap: 12px; }
.brand { font-size: 1.08rem; font-weight: 700; }
.brand small { display: block; font-size: .72rem; color: var(--soft); margin-top: 5px; font-weight: 400; }
.mark { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); }
.mark svg { width: 23px; }
.badge { display: flex; align-items: center; gap: 7px; padding: 7px 10px; color: var(--soft); font-size: .75rem; border: 1px solid var(--border); border-radius: 8px; }
.badge i { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.quiet { color: var(--soft); background: none; border: 0; padding: 8px 3px; }
.quiet:hover { color: var(--text); }
main { padding-block: 36px 22px; }
.eyebrow { color: var(--accent); font-size: .78rem; font-weight: 700; }
h1 { margin: 12px 0 9px; font-size: clamp(1.55rem, 4vw, 2.35rem); line-height: 1.5; }
p { color: var(--soft); font-size: .91rem; line-height: 1.9; margin: 0; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.archive { min-width: 200px; background: var(--panel); border: 1px solid var(--border); padding: 11px 14px; border-radius: 10px; display: grid; gap: 8px; }
.archive span { color: var(--soft); font-size: .75rem; }
.archive strong { font-size: .85rem; line-height: 1.6; }
.panel { border: 1px solid var(--border); background: var(--panel); border-radius: 17px; }
.login { width: min(100%, 490px); margin: 24px auto; padding: clamp(20px, 5vw, 34px); }
.login h1 { font-size: 1.55rem; }
.login form { display: grid; gap: 11px; margin-top: 23px; }
.login label { color: var(--soft); font-size: .83rem; }
.login input, .composer { background: var(--field); border: 1px solid var(--border); color: var(--text); border-radius: 11px; padding: 12px; }
.primary { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 9px; font-weight: 700; padding: 10px 17px; min-height: 41px; }
.primary:hover { background: #adf2dd; }
.chat { padding: 18px; }
#messages { display: flex; flex-direction: column; align-items: flex-start; gap: 13px; height: clamp(245px, 39vh, 500px); overflow-y: auto; padding: 4px; overscroll-behavior: contain; scrollbar-color: var(--border) transparent; }
.message { width: fit-content; max-width: min(85%, 610px); background: #20333d; border: 1px solid #304954; border-radius: 12px 4px 12px 12px; padding: 10px 13px; }
.message[data-who="you"] { align-self: flex-end; background: #23443d; border-color: #3b6056; border-radius: 4px 12px 12px 12px; }
.message p { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.message small { display: block; color: var(--soft); margin-bottom: 4px; font-size: .7rem; }
.message .source { margin: 7px 0 0; font-size: .69rem; }
.prompts { display: flex; flex-wrap: wrap; gap: 7px; margin: 13px 0; }
.prompts button { background: transparent; color: var(--soft); border: 1px solid #3c5660; border-radius: 8px; padding: 8px 10px; font-size: .77rem; line-height: 1.5; }
.prompts button:hover { color: var(--accent); border-color: var(--accent); }
.composer { display: flex; align-items: end; gap: 10px; padding: 7px; }
.composer:focus-within { border-color: var(--accent); }
.composer textarea { flex: 1; min-width: 0; background: transparent; color: var(--text); border: 0; resize: vertical; padding: 8px 6px; line-height: 1.55; font-size: .89rem; max-height: 170px; }
.composer textarea:focus-visible { outline-offset: 0; }
.composer textarea::placeholder { color: #97adb0; }
.composer-tools { display: flex; gap: 6px; }
.icon { display: grid; place-items: center; min-width: 40px; min-height: 40px; background: #233740; border: 1px solid var(--border); border-radius: 9px; color: var(--accent); }
.icon svg { width: 20px; height: 20px; }
.notice { color: #f5d090; margin-top: 8px; font-size: .77rem; }
.notice:empty { display: none; }
footer { padding: 12px 0; color: var(--soft); font-size: .74rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 620px) {
  .shell { width: min(100% - 26px, 1050px); }
  header { padding: 15px 0; }
  main { padding-top: 25px; }
  .intro { align-items: stretch; flex-direction: column; gap: 13px; margin-bottom: 15px; }
  .archive { min-width: 0; }
  .chat { padding: 11px; }
  .message { max-width: 92%; }
  .prompts button { font-size: .7rem; }
}
