@import url("https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Cinzel:wght@600;800&family=Noto+Sans+Arabic:wght@400;500;600;700&family=Noto+Naskh+Arabic:wght@600;700&display=swap");
:root {
  --night: #17120d;
  --paper: #e9d8b3;
  --paper2: #d9bf8f;
  --ink: #332619;
  --gold: #aa7628;
  --red: #7d2e24;
  --line: #76542d55;
  font-family: "Amiri", Georgia, serif;
}
* {
  box-sizing: border-box;
}
body {
  min-height: 100vh;
  margin: 0;
  padding: 28px 16px;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0, #49351f 0, transparent 38%), var(--night);
}
body:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    repeating-linear-gradient(8deg, transparent 0 26px, #d7b87a12 27px),
    repeating-linear-gradient(92deg, transparent 0 38px, #d7b87a0c 39px);
}
.container {
  position: relative;
  width: min(1050px, 100%);
  margin: auto;
  padding: clamp(24px, 5vw, 58px);
  border: 1px solid #d4ad6844;
  border-radius: 3px;
  background: linear-gradient(110deg, #eadbb9f7, #d9c096f5);
  box-shadow:
    0 35px 90px #000b,
    inset 0 0 90px #72512624;
  overflow: hidden;
}
.container:before,
.container:after {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  border-color: var(--gold);
  opacity: 0.65;
}
.container:before {
  top: 15px;
  right: 15px;
  border-top: 2px solid;
  border-right: 2px solid;
}
.container:after {
  bottom: 15px;
  left: 15px;
  border-bottom: 2px solid;
  border-left: 2px solid;
}
nav {
  position: relative;
  z-index: 2;
  text-align: left;
  margin-bottom: 18px;
}
nav a {
  padding: 7px 14px;
  border: 1px solid var(--line);
  color: var(--red);
  background: #f5e8ca88;
  text-decoration: none;
  font:
    700 13px Cinzel,
    serif;
}
.atlas-emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  margin: 0 auto 18px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: var(--red);
  background: radial-gradient(circle, #f2e3c2 0 46%, transparent 47%);
  box-shadow:
    0 0 0 7px #aa76281d,
    0 0 0 8px var(--gold);
}
.atlas-emblem:before,
.atlas-emblem:after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  transform: rotate(45deg);
}
.atlas-emblem:after {
  inset: -13px 61px;
  border: 0;
  border-left: 2px solid var(--gold);
  border-radius: 0;
}
.atlas-emblem span {
  z-index: 2;
  font:
    800 16px Cinzel,
    serif;
  letter-spacing: 2px;
}
.dna-helix {
  position: absolute;
  z-index: 1;
  top: 19px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 64px;
  opacity: 0.75;
}
.dna-helix i {
  display: block;
  height: 5px;
  border-top: 2px solid var(--red);
  border-bottom: 2px solid var(--gold);
  border-radius: 50%;
  transform: rotate(-12deg);
}
.dna-helix i:nth-child(even) {
  transform: rotate(12deg);
}
.atlas-emblem span {
  position: absolute;
  bottom: 19px;
  padding: 2px 7px;
  background: #f2e3c2de;
}
.brand-kicker {
  text-align: center;
  margin: 0;
  color: var(--red);
  font:
    700 11px Cinzel,
    serif;
  letter-spacing: 3px;
}
h1 {
  text-align: center;
  margin: 7px 0 0;
  color: #322114;
  font:
    800 clamp(44px, 8vw, 78px) Cinzel,
    "Amiri",
    serif;
  letter-spacing: 5px;
  line-height: 1;
}
.description {
  max-width: 690px;
  margin: 16px auto 36px;
  text-align: center;
  color: #634b32;
  font-size: 20px;
  line-height: 1.75;
}
form {
  position: relative;
  padding: 23px;
  border: 1px solid var(--line);
  background: #f4e8cc99;
  box-shadow: inset 0 0 35px #8f6b3012;
}
form:before {
  content: "✦";
  position: absolute;
  top: -15px;
  left: 50%;
  padding: 0 12px;
  color: var(--gold);
  background: var(--paper2);
  transform: translateX(-50%);
}
form label {
  display: block;
  margin-bottom: 9px;
  color: var(--red);
  font-size: 18px;
  font-weight: 700;
}
textarea {
  display: block;
  width: 100%;
  min-height: 145px;
  padding: 16px;
  border: 1px solid #85623866;
  border-radius: 2px;
  outline: none;
  resize: vertical;
  color: var(--ink);
  background: #fff8e9b8;
  font:
    18px "Amiri",
    serif;
  line-height: 1.8;
}
textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px #7d2e2418;
}
button {
  margin-top: 13px;
  padding: 11px 22px;
  border: 1px solid #5d2019;
  border-radius: 2px;
  color: #f8ead0;
  background: linear-gradient(#934034, #6f291f);
  font:
    700 17px "Amiri",
    serif;
  cursor: pointer;
  transition: 0.2s;
}
button:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
form button {
  width: 100%;
}
.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 13px 0 0;
}
.quick-prompts button {
  margin: 0;
  padding: 6px 11px;
  border-color: var(--line);
  color: #63472a;
  background: #ead6ad;
  font-size: 13px;
}
.result {
  position: relative;
  margin-top: 34px;
}
.result > h2,
.result h2 {
  margin: 22px 0 10px;
  color: var(--red);
  font-size: 25px;
}
.result > #answer,
#sources,
.confidence {
  padding: 20px;
  border: 1px solid var(--line);
  background: #f8ecd2a8;
}
#answer {
  direction: rtl;
  text-align: right;
  unicode-bidi: plaintext;
  font-size: 18px;
  line-height: 2;
}
#answer h1,
#answer h2,
#answer h3 {
  text-align: inherit;
  margin: 20px 0 8px;
  color: var(--red);
  font-family: "Amiri", serif;
  letter-spacing: 0;
}
#answer p {
  margin: 8px 0;
}
#answer ul,
#answer ol {
  padding-right: 27px;
}
#answer blockquote {
  margin: 12px 0;
  padding: 8px 16px;
  border-right: 4px solid var(--red);
  background: #b78b4220;
}
#answer table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
}
#answer th,
#answer td {
  padding: 9px 11px;
  border: 1px solid var(--line);
}
#answer th {
  color: var(--red);
  background: #b2873d20;
}
#answer pre {
  direction: ltr;
  overflow: auto;
  padding: 14px;
  color: #f4e8d0;
  background: #2a2118;
  text-align: left;
}
#answer code {
  direction: ltr;
  unicode-bidi: embed;
}
#answer img {
  display: block;
  max-width: 100%;
  max-height: 340px;
  margin: 14px auto;
  object-fit: contain;
}
#sources {
  margin: 0;
  padding-right: 35px;
  line-height: 1.9;
}
#sources a {
  color: var(--red);
}
.confidence {
  margin-top: 14px;
  color: #654618;
}
.timeline,
.map-section,
#images-section {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.timeline-item {
  display: grid;
  grid-template-columns: 65px 14px 1fr;
  gap: 9px;
}
.timeline-item strong {
  color: var(--red);
}
.timeline-item span {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--gold);
}
.timeline-item p {
  margin: 0 0 13px;
}
#images-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 13px;
}
#images-gallery img {
  display: block;
  width: 100%;
  height: 165px;
  border: 4px double #8b6635;
  object-fit: cover;
  filter: sepia(0.18);
}
@media (max-width: 650px) {
  body {
    padding: 8px;
  }
  .container {
    padding: 24px 16px;
  }
  .atlas-emblem {
    width: 100px;
    height: 100px;
  }
  h1 {
    letter-spacing: 2px;
  }
  .description {
    font-size: 17px;
  }
}
.auth-language {
  display: block;
  width: max-content;
  margin: 0 0 18px auto;
  padding: 6px 12px;
  border: 1px solid var(--line);
  color: var(--red);
  text-decoration: none;
  font-weight: 700;
}
.timeline-content {
  margin: 0 0 14px;
  line-height: 1.75;
}
.timeline-content p {
  margin: 0;
}
.timeline-content strong {
  color: var(--red);
}
.timeline-content a {
  color: var(--red);
  text-decoration: underline;
}
.timeline-content code {
  direction: ltr;
  padding: 1px 4px;
  background: #b2873d20;
}
html[lang="en"] body,
html[lang="en"] textarea,
html[lang="en"] input {
  direction: ltr;
  text-align: left;
}
html[lang="en"] #answer {
  direction: ltr;
  text-align: left;
}
html[lang="en"] #answer ul,
html[lang="en"] #answer ol {
  padding-left: 27px;
  padding-right: 0;
}
html[lang="en"] #answer blockquote {
  border-left: 4px solid var(--red);
  border-right: 0;
}
html[lang="en"] #sources {
  padding-left: 35px;
  padding-right: 20px;
}
html[lang="en"] .timeline-item {
  direction: ltr;
  text-align: left;
}
html[lang="en"] form label {
  text-align: left;
}
.logout {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 3;
  margin: 0;
  padding: 6px 12px;
  font-size: 13px;
}
.auth-shell {
  width: min(480px, 100%);
  margin: 6vh auto;
  padding: 38px;
  border: 1px solid #d4ad6844;
  background: linear-gradient(110deg, #eadbb9f7, #d9c096f5);
  box-shadow: 0 35px 90px #000b;
}
.auth-shell h1 {
  font-size: 38px;
  letter-spacing: 0;
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 24px 0 12px;
}
.auth-tabs button {
  margin: 0;
  color: var(--ink);
  background: #ead6ad;
  border-color: var(--line);
}
.auth-tabs button.active {
  color: #f8ead0;
  background: var(--red);
}
.auth-shell form {
  display: grid;
  gap: 9px;
}
.auth-shell input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff8e9;
  font: 16px inherit;
}
.auth-shell button {
  width: 100%;
}
#auth-message {
  min-height: 24px;
  color: var(--red);
  text-align: center;
}

/* Full-screen research workspace */
body:has(.app-shell) {
  height: 100vh;
  height: 100svh;
  padding: 0;
  overflow: hidden;
  background: #17120d;
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
  height: 100%;
  color: var(--ink);
  background: #e5d2aa;
}

.app-header {
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 3vw, 44px);
  border-bottom: 1px solid #76542d44;
  background: #eee0c4;
  box-shadow: 0 4px 20px #2d1d0d12;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #3b2918;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--red);
  font: 800 19px Cinzel, "Amiri", serif;
  box-shadow: inset 0 0 0 4px #eee0c4, inset 0 0 0 5px #aa762855;
}

.header-logo-frame {
  position: relative;
  display: block;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
}
.atlas-logo-image {
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}

.header-original-logo.atlas-emblem {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0;
  transform: translate(-50%, -50%) scale(0.34);
}

.header-original-logo.atlas-emblem > .dna-helix {
  z-index: 1;
  top: 19px;
  bottom: auto;
  display: flex;
  width: 64px;
  padding: 0;
  background: transparent;
}

.brand-logo.atlas-emblem {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  margin: 0;
  border: 4px solid #ad741e;
  border-radius: 50%;
  background: #ead8b4;
  box-shadow: inset 0 0 0 1px #9a6722, 0 0 0 1px #c5913f;
  overflow: visible;
}

.brand-logo.atlas-emblem::before {
  content: "";
  position: absolute;
  inset: 5px;
  width: auto;
  height: auto;
  border: 1px solid #a87735;
  border-radius: 50%;
  opacity: 0.8;
  transform: none;
}

.brand-logo.atlas-emblem::after {
  content: "";
  position: absolute;
  inset: -4px auto auto 20px;
  width: 1px;
  height: 53px;
  border: 0;
  background: #ae721d;
  opacity: 0.9;
  transform: rotate(43deg);
}

.brand-logo .logo-orbits {
  position: absolute;
  inset: 9px;
  display: block;
  padding: 0;
  border: 1px solid #b37d35;
  border-radius: 50%;
  background: transparent;
}

.brand-logo .logo-lines {
  position: absolute;
  inset: 8px 9px 13px;
  display: block;
  padding: 0;
  background: transparent;
}

.brand-logo .logo-lines i {
  position: absolute;
  left: 2px;
  display: block;
  width: 24px;
  height: 1px;
  background: #8e3e32;
  transform-origin: center;
}

.brand-logo .logo-lines i:nth-child(1) {
  top: 3px;
  transform: rotate(-10deg);
}

.brand-logo .logo-lines i:nth-child(2) {
  top: 7px;
  transform: rotate(19deg);
}

.brand-logo .logo-lines i:nth-child(3) {
  top: 11px;
  transform: rotate(-19deg);
}

.brand-logo .logo-lines i:nth-child(4) {
  top: 15px;
  transform: rotate(16deg);
}

.brand-logo .logo-lines i:nth-child(5) {
  top: 19px;
  transform: rotate(-13deg);
}

.brand-logo.atlas-emblem > strong {
  position: absolute;
  z-index: 2;
  right: 5px;
  bottom: 5px;
  padding: 0 2px;
  color: var(--red);
  background: #ead8b4dd;
  font: 700 7px Cinzel, "Amiri", serif;
  letter-spacing: 0;
  line-height: 1.2;
}

.query-title-row {
  display: flex;
  align-items: center;
  gap: 19px;
}

.query-title-row > div {
  min-width: 0;
}


.brand > span:last-child {
  display: grid;
  line-height: 1.1;
}

.brand strong {
  font: 800 17px Cinzel, "Amiri", serif;
  letter-spacing: 2px;
}

.brand small {
  margin-top: 3px;
  color: #74583b;
  font-size: 10px;
  letter-spacing: 0.8px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-link,
.app-header .logout {
  position: static;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin: 0;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #674a2d;
  background: transparent;
  text-decoration: none;
  font: 700 13px "Amiri", Georgia, serif;
}

.app-header .logout {
  color: #f8ead0;
  background: var(--red);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  min-height: 0;
}

.query-panel {
  display: flex;
  flex-direction: column;
  gap: clamp(15px, 2.7vh, 25px);
  min-height: 0;
  padding: clamp(22px, 3.5vh, 36px) clamp(22px, 3vw, 42px) 20px;
  border-inline-end: 1px solid #76542d44;
  background:
    linear-gradient(150deg, #f0e3c9ee, #d8bd8aee),
    repeating-linear-gradient(8deg, transparent 0 26px, #d7b87a12 27px);
  overflow: hidden;
}

.query-panel .brand-kicker {
  text-align: start;
  font-size: 10px;
  letter-spacing: 2.5px;
}

.query-panel h1 {
  margin: 7px 0 0;
  text-align: start;
  font-size: clamp(37px, 4vw, 58px);
  letter-spacing: -1px;
  line-height: 1.05;
}

.query-panel .description {
  margin: 0;
  text-align: start;
  color: #6d5338;
  font-size: 17px;
  line-height: 1.65;
}

.query-panel form {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.query-panel form::before {
  display: none;
}

.query-panel textarea {
  min-height: 118px;
  max-height: 220px;
  padding: 14px;
  border-radius: 8px;
  background: #fffaf0cc;
  font-size: 16px;
  line-height: 1.55;
}

#submit-question {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 47px;
  border-radius: 8px;
}

#submit-question:disabled {
  cursor: wait;
  opacity: 0.8;
  transform: none;
}

.button-loader {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid #f8ead066;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

#submit-question.is-loading .button-loader {
  display: block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.request-status {
  min-height: 21px;
  margin: 8px 0 0;
  color: #78552f;
  text-align: center;
  font-size: 13px;
}

.quick-prompts {
  justify-content: flex-start;
  align-content: flex-start;
  margin-top: 0;
}

.quick-prompts button {
  border-radius: 999px;
  white-space: nowrap;
}

.result {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: clamp(26px, 4vh, 46px) clamp(24px, 5vw, 72px);
  overflow-y: auto;
  background: #f7eedb;
  scrollbar-width: none;
}

.result::-webkit-scrollbar {
  display: none;
}

.result-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  max-width: 980px;
  margin: 0 auto 16px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.result .eyebrow {
  color: var(--gold);
  font: 700 10px Cinzel, "Amiri", serif;
  letter-spacing: 2px;
}

.result-heading h2 {
  margin: 2px 0 0;
  font-size: 31px;
  line-height: 1.15;
}

.result > #answer,
.result #sources,
.result .confidence {
  padding: 0;
  border: 0;
  background: transparent;
}

#answer {
  max-width: 980px;
  min-height: 170px;
  margin: auto;
  font-size: 17px;
  line-height: 1.85;
}

#answer.answer-empty {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: calc(100svh - 260px);
  border: 1px dashed #95714355;
  border-radius: 12px;
  color: #765b40;
  text-align: center;
}

.result:has(#answer.answer-empty) .sources-section {
  display: none;
}

.result-sections {
  display: grid;
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
}

.result-card {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 180px;
  margin: 0;
  padding: clamp(18px, 2.5vw, 28px);
  border: 1px solid #8d683b38;
  border-radius: 12px;
  background: #fffaf0b8;
  box-shadow: 0 8px 28px #5b3b1810;
}

.result-card > h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  padding-bottom: 11px;
  border-bottom: 1px solid #8d683b2e;
  color: var(--red);
  font-size: 20px;
}

.result-card > h2 span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #fff6e3;
  background: var(--red);
  font: 16px/1 Arial, sans-serif;
}

.result-card #answer,
.result-card #sources {
  max-width: none;
}

.result-card #answer.answer-empty {
  min-height: calc(100svh - 350px);
  border: 0;
}

.result-card.sources-section,
.result-card#images-section,
.result-card#map-section,
.result-card.timeline {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: clamp(18px, 2.5vw, 28px);
  border-top: 1px solid #8d683b38;
}

#event-map {
  width: 100%;
  height: clamp(280px, 42vh, 430px);
  border: 1px solid #8d683b45;
  border-radius: 8px;
  background: #e5d9bf;
  overflow: hidden;
}

.map-details {
  margin: 12px 0 0;
  color: #654a2e;
  font-size: 14px;
  line-height: 1.6;
}

.map-details a {
  color: var(--red);
  font-weight: 700;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  color: var(--ink);
  background: #fff8e9;
}

html[dir="rtl"] .leaflet-control-container,
html[dir="rtl"] .leaflet-popup-content {
  direction: rtl;
}

#answer.answer-empty p {
  margin: 0;
  color: #5f4227;
  font-size: 20px;
  font-weight: 700;
}

#answer.answer-empty small {
  margin-top: 5px;
}

.result.is-loading #answer {
  opacity: 0.45;
}

.sources-section,
#images-section,
.timeline {
  max-width: 980px;
  margin-inline: auto;
}

.sources-section {
  margin-top: 22px;
  padding-top: 2px;
}

.sources-section h2,
#images-section h2,
.timeline h2 {
  margin: 18px 0 8px;
  font-size: 20px;
}

#sources {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-inline-start: 22px;
  line-height: 1.55;
}

.empty-source {
  color: #856b4e;
  list-style: none;
}

.confidence {
  margin: 0;
  color: #76501d;
  font-size: 13px;
  white-space: nowrap;
}

#images-gallery {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#images-gallery img {
  height: clamp(130px, 19vh, 210px);
  border: 1px solid #8b663566;
  border-radius: 7px;
  background: #e4d3b5;
  filter: none;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#images-gallery img:hover,
#images-gallery img:focus-visible {
  outline: none;
  box-shadow: 0 8px 24px #39220f38;
  transform: translateY(-2px);
}

.image-viewer {
  width: min(1100px, calc(100vw - 32px));
  max-width: none;
  height: min(820px, calc(100vh - 32px));
  max-height: none;
  margin: auto;
  padding: 48px 24px 18px;
  border: 1px solid #c49a5d77;
  border-radius: 12px;
  color: #f8edda;
  background: #17120df2;
  box-shadow: 0 30px 100px #000b;
}

.image-viewer[open] {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
}

.image-viewer::backdrop {
  background: #090704d9;
  backdrop-filter: blur(5px);
}

.image-viewer img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.image-viewer p {
  max-width: 800px;
  margin: 12px 0 0;
  color: #e8d4af;
  text-align: center;
  font-size: 14px;
}

.image-viewer-close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border-color: #f4e8d055;
  border-radius: 50%;
  color: #fff;
  background: #ffffff12;
  font: 28px/1 Arial, sans-serif;
}

html[dir="rtl"] .image-viewer-close {
  right: auto;
  left: 14px;
}

html[dir="rtl"] .query-panel h1 {
  letter-spacing: 0;
}

html[lang="ar"] .app-shell,
html[lang="ar"] .app-shell button,
html[lang="ar"] .app-shell textarea {
  font-family: "Noto Sans Arabic", "Amiri", sans-serif;
}

html[lang="ar"] .query-panel h1,
html[lang="ar"] .result h2,
html[lang="ar"] #answer {
  font-family: "Noto Naskh Arabic", "Amiri", serif;
}

html[lang="ar"] .query-panel h1 {
  font-size: clamp(39px, 4vw, 56px);
  font-weight: 700;
  line-height: 1;
}

html[lang="ar"] .query-panel .description {
  font-size: 16px;
  line-height: 1.8;
}

html[lang="ar"] .query-panel form label {
  font-size: 16px;
  font-weight: 700;
}

html[lang="ar"] #answer {
  font-size: 17px;
  line-height: 2;
}

@media (max-width: 820px) {
  body:has(.app-shell) {
    height: auto;
    min-height: 100svh;
    overflow: auto;
  }

  .app-shell {
    display: block;
    min-height: 100svh;
  }

  .app-header {
    position: sticky;
    top: 0;
    height: 64px;
  }

  .workspace {
    display: block;
  }

  .query-panel {
    gap: 20px;
    padding: 28px 20px 22px;
    border-inline-end: 0;
    border-bottom: 1px solid #76542d44;
    overflow: visible;
  }


  .query-panel h1 {
    font-size: 38px;
  }

  .query-panel .description {
    display: none;
  }

  .query-panel textarea {
    min-height: 96px;
  }

  .quick-prompts {
    flex-wrap: nowrap;
    justify-content: flex-start;
    margin: 0 -20px;
    padding: 0 20px 3px;
    overflow-x: auto;
  }

  .result {
    padding: 28px 20px 48px;
    overflow: visible;
  }

  #answer.answer-empty {
    min-height: 180px;
  }

  .result-card #answer.answer-empty {
    min-height: 180px;
  }

  #images-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #event-map {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .brand small {
    display: none;
  }

  .language-link,
  .app-header .logout {
    padding: 5px 10px;
  }

  #images-gallery {
    grid-template-columns: 1fr;
  }
}
