/* DEMO pages only (start page, side-by-side view, and the slim demo bar on app pages). */
:root {
  --teal: #0f766e;
  --teal-dark: #0b4f4a;
  --ink: #12312e;
  --muted: #5b6f6c;
  --line: #d7e4e2;
  --bg: #f3f8f7;
  --card: #ffffff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }

body.launcher, body.side {
  margin: 0;
  font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

/* ---------- start page ---------- */
.wrap { max-width: 860px; margin: 0 auto; padding: 28px 16px 40px; }
.head { display: flex; align-items: center; gap: 14px; }
.logo { border-radius: 14px; background: #fff; padding: 6px; box-shadow: 0 2px 10px rgba(15, 118, 110, 0.15); }
h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.2rem); }
h1 .ar { color: var(--teal); font-weight: 700; margin-inline-start: 6px; }
.sub { margin: 4px 0 0; color: var(--muted); }
.note { margin: 20px 0 0; padding: 12px 14px; background: #e6f3f1; border: 1px solid var(--line); border-radius: 12px; line-height: 1.5; }
.status { margin: 22px 0; font-weight: 600; color: var(--teal-dark); }
.status.error { color: #a1281b; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.card {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  text-align: start;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.card img { grid-row: 1 / span 2; }
.card b { font-size: 1.02rem; }
.card span { color: var(--muted); font-size: 0.9rem; line-height: 1.4; }
.card:hover { border-color: var(--teal); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(15, 118, 110, 0.12); }
.card:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.card.wide { grid-column: 1 / -1; background: linear-gradient(135deg, #e6f3f1, #fff); }

.foot { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.link { background: none; border: 0; padding: 0; color: var(--teal); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
.muted { color: var(--muted); font-size: 0.9rem; }

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
}

/* ---------- side by side ---------- */
body.side { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.side-head { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.side-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; min-height: 0; }
.side-grid section { display: flex; flex-direction: column; min-height: 0; }
.side-grid h2 { margin: 0 0 6px; font-size: 0.95rem; color: var(--teal-dark); }
.side-grid iframe { flex: 1; width: 100%; min-height: 360px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
@media (max-width: 760px) {
  .side-grid { grid-template-columns: 1fr; }
}
