/* IBM Plex Sans Arabic (SIL OFL 1.1، الترخيص بـ fonts/IBM-Plex-Sans-Arabic-OFL.txt). */

/* "IBM Plex Sans Arabic" للنص، و"AWAPHs Arabic" للحروف العربية بس داخل العناوين اللي تبقى Arial. */

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../../fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../../fonts/ibm-plex-sans-arabic-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../../fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../../fonts/ibm-plex-sans-arabic-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../../fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../../fonts/ibm-plex-sans-arabic-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../../fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2") format("woff2");
  font-weight: 700 900;
  font-display: swap;
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../../fonts/ibm-plex-sans-arabic-latin-700-normal.woff2") format("woff2");
  font-weight: 700 900;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "AWAPHs Arabic";
  src: url("../../fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC;
}

@font-face {
  font-family: "AWAPHs Arabic";
  src: url("../../fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC;
}

@font-face {
  font-family: "AWAPHs Arabic";
  src: url("../../fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC;
}

@font-face {
  font-family: "AWAPHs Arabic";
  src: url("../../fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2") format("woff2");
  font-weight: 700 900;
  font-display: swap;
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC;
}

:root {
  --paper: #f5f1e7;
  --ink: #19212b;
  --red: #cc2f29;
  --blue: #284dbb;
  --yellow: #ffe16a;
  --line: 2px solid var(--ink);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans Arabic", Tahoma, "AWAPHs Arabic", Arial, sans-serif;
  font-size: 0.875rem;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
select {
  font: inherit;
  color: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
select:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 5px;
}
button {
  border: 0;
  background: none;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  line-height: 1.65;
}
p {
  line-height: 2.1;
}
.topbar {
  max-width: 1400px;
  margin: auto;
  padding: 23px 5%;
  border-bottom: var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: right;
}
.brand b {
  font-family: "AWAPHs Arabic", Arial, sans-serif;
  display: block;
  font-size: 1.6875rem;
  letter-spacing: -1.4px;
  font-weight: 900;
}
.brand-dot {
  color: var(--red);
}
.brand small {
  font-size: 0.75rem;
}
.brand-mark {
  display: grid;
  place-items: center;
  position: relative;
  background: var(--red);
  color: var(--paper);
  font: bold 1.75rem "AWAPHs Arabic", Arial;
  width: 43px;
  height: 43px;
  border: var(--line);
  transform: rotate(-8deg);
  box-shadow: 3px 3px var(--ink);
}
.brand-mark span {
  position: absolute;
  left: 6px;
  top: 17px;
  font-size: 1.25rem;
  color: var(--yellow);
}
nav {
  display: flex;
  gap: 32px;
  font-size: 0.75rem;
  font-weight: 700;
}
nav button:hover {
  color: var(--red);
}
.edition {
  font: 0.75rem monospace;
  letter-spacing: 1px;
}
.page {
  max-width: 1280px;
  margin: auto;
  padding: 0 40px;
}
.hidden {
  display: none !important;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 70px;
  padding: 70px 0 65px;
}
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 1px;
  font-weight: 700;
  display: block;
  margin-bottom: 15px;
}
.eyebrow i,
.availability i {
  width: 8px;
  height: 8px;
  background: var(--red);
  display: inline-block;
  border-radius: 50%;
  margin-left: 8px;
}
.hero h1 {
  font-size: 3.625rem;
  font-weight: 900;
  line-height: 1.75;
  letter-spacing: -2px;
  margin-bottom: 20px;
}
.underlined {
  position: relative;
  z-index: 1;
  white-space: nowrap;
}
.underlined:after {
  content: "";
  position: absolute;
  left: -5px;
  right: -5px;
  bottom: 10px;
  height: 20px;
  background: var(--yellow);
  z-index: -1;
  transform: rotate(-3deg);
}
.hero p {
  font-size: 0.9375rem;
  color: #58606a;
  margin-bottom: 28px;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background: var(--red);
  color: #fff;
  border: var(--line);
  box-shadow: 4px 4px var(--ink);
  text-decoration: none;
  font-weight: 700;
  padding: 14px 23px;
  font-size: 0.8125rem;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.primary:not(:disabled):hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px var(--ink);
}
.primary span {
  font-size: 1.5rem;
  line-height: 1;
}
.hero-meta {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  font-size: 0.75rem;
  color: #555;
}
.hero-meta span:before {
  content: "✦";
  color: var(--red);
  margin-left: 6px;
}
.hero-art {
  aspect-ratio: 1.05;
  background: #c4d8ec;
  border: 3px solid var(--ink);
  box-shadow: 9px 9px var(--ink);
  position: relative;
  transform: rotate(2deg);
  overflow: hidden;
  background-image: radial-gradient(#658ab940 1px, transparent 1px);
  background-size: 7px 7px;
}
.panel-corner {
  position: absolute;
  top: 0;
  left: 0;
  font: 0.75rem monospace;
  letter-spacing: 1px;
  padding: 12px;
  background: var(--yellow);
  border-bottom: var(--line);
  border-right: var(--line);
  z-index: 2;
}
.hero-flask {
  position: absolute;
  inset: 30px 0 0;
  width: 100%;
  height: 90%;
  filter: drop-shadow(9px 10px 0 #23427726);
}
.orbit {
  position: absolute;
  border: 1px solid #264d6d33;
  width: 90%;
  height: 90%;
  border-radius: 50%;
  top: 7%;
  left: 5%;
}
.o2 {
  transform: scale(0.75);
}
.star {
  position: absolute;
  font-size: 2.5rem;
}
.s1 {
  left: 35px;
  bottom: 50px;
}
.s2 {
  right: 40px;
  top: 70px;
  font-size: 1.75rem;
}
.bubble-label {
  position: absolute;
  right: 25px;
  top: 35px;
  z-index: 2;
  font-size: 0.8125rem;
  background: #fffef8;
  padding: 12px 18px;
  border: var(--line);
  border-radius: 50%;
  transform: rotate(-8deg);
}
.pow {
  position: absolute;
  left: 22px;
  bottom: 42px;
  font: italic 900 1.8125rem/0.9 "AWAPHs Arabic", Arial;
  transform: rotate(-13deg);
  color: var(--paper);
  -webkit-text-stroke: 1px var(--ink);
  text-shadow: 3px 3px var(--ink);
}
.art-caption {
  position: absolute;
  bottom: 0;
  right: 0;
  padding: 7px 13px;
  background: var(--yellow);
  border-top: var(--line);
  border-left: var(--line);
  font-size: 0.75rem;
}
.hero-liquid {
  animation: wave 3s ease-in-out infinite;
  transform-origin: center;
}
.hero-bubble {
  animation: rise 3s infinite;
}
.delay {
  animation-delay: 1s;
}
@keyframes wave {
  50% {
    transform: translateY(6px) rotate(2deg);
  }
}
@keyframes rise {
  0% {
    transform: translateY(10px);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    transform: translateY(-45px);
    opacity: 0;
  }
}
.labs-section {
  padding: 15px 0 50px;
  scroll-margin-top: 25px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.section-heading h2 {
  font-size: 1.4375rem;
  margin: 0;
}
.section-heading .eyebrow {
  margin-bottom: 7px;
}
.availability {
  font-size: 0.75rem;
  white-space: nowrap;
}
.availability i {
  background: #4a826d;
  margin: 0 8px 0 0;
}
.lab-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 19px;
}
.lab-card {
  position: relative;
  border: var(--line);
  background: #fcfaf4;
  box-shadow: 4px 4px var(--ink);
  padding: 0;
  text-align: right;
  overflow: hidden;
  transition: transform 0.2s;
}
.lab-card:not(:disabled):hover {
  transform: translateY(-6px);
}
.lab-card:disabled {
  opacity: 1;
  cursor: default;
}
.card-art {
  height: 152px;
  background: var(--card-color);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-bottom: var(--line);
  background-image: radial-gradient(#18203924 1px, transparent 1px);
  background-size: 6px 6px;
}
.card-number {
  position: absolute;
  left: 12px;
  top: 12px;
  font: 0.75rem monospace;
}
.lab-icon {
  height: 106px;
  width: 106px;
  transform: rotate(-8deg);
  transition: transform 0.3s;
}
.lab-card:hover .lab-icon {
  transform: rotate(2deg);
}
.card-state {
  position: absolute;
  right: 12px;
  top: 12px;
  border: 1px solid var(--ink);
  background: #fffdf2;
  padding: 2px 8px;
  font-size: 0.75rem;
}
.card-state.available {
  background: var(--yellow);
}
.card-body {
  padding: 19px 16px;
  min-height: 155px;
}
.card-body small {
  font: 0.75rem monospace;
  color: #5e626b;
  letter-spacing: 0.6px;
}
.card-body h3 {
  font-size: 0.9375rem;
  margin: 7px 0 14px;
}
.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #5d6268;
}
.card-arrow {
  width: 27px;
  height: 27px;
  border: 1px solid var(--ink);
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: 1.1875rem;
}
.lab-card.active .card-arrow {
  background: var(--red);
  color: white;
}
.how-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: var(--line);
  border-bottom: var(--line);
  padding: 28px 20px;
  margin: 10px 0 55px;
  background: #ede8dc;
}
.strip-title {
  font-weight: 800;
  font-size: 0.9375rem;
}
.how-strip div {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8125rem;
}
.how-strip b {
  font: bold 1.9375rem "AWAPHs Arabic", Arial;
  color: var(--blue);
}
.strip-star {
  font-size: 3rem;
  color: var(--red);
}
footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 25px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #19212b40;
  font-size: 0.75rem;
  color: #666;
}
footer p {
  margin: 0;
}
.footer-brand {
  font: bold 1.125rem "AWAPHs Arabic", Arial;
  color: var(--ink);
}
.footer-brand span {
  color: var(--red);
  margin-left: 9px;
}
.text-back {
  font-size: 0.8125rem;
  color: #5d6268;
  padding: 0;
  margin: 27px 0;
}
.catalog-head h1 {
  font-size: 2.5rem;
  font-weight: 900;
}
.catalog-head h1 span {
  color: var(--blue);
}
.catalog-head p {
  color: #5c6269;
}
.experiment-card {
  display: grid;
  grid-template-columns: 310px 1fr;
  border: var(--line);
  box-shadow: 6px 6px var(--ink);
  background: #fffdf6;
  margin: 30px 0;
}
.experiment-cover {
  background: var(--red);
  position: relative;
  min-height: 310px;
  border-left: var(--line);
  overflow: hidden;
  background-image: radial-gradient(#19212b44 1px, transparent 1px);
  background-size: 7px 7px;
}
.issue {
  position: absolute;
  top: 20px;
  right: 20px;
  font: 0.8125rem "AWAPHs Arabic", Arial;
  background: var(--yellow);
  border: var(--line);
  padding: 8px;
}
.issue b {
  display: block;
  font-size: 2.1875rem;
}
.molecule {
  position: absolute;
  left: 50px;
  top: 45px;
  font: 11.25rem "AWAPHs Arabic", Arial;
  color: #fff5de;
  transform: rotate(-15deg);
  text-shadow: 4px 4px var(--ink);
}
.cover-tag {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: #fffdf6;
  border: var(--line);
  padding: 5px 16px;
  transform: rotate(4deg);
  font-size: 0.8125rem;
}
.experiment-info {
  padding: 35px;
}
.experiment-info h2 {
  font-size: 1.625rem;
  margin-bottom: 8px;
}
.english {
  text-align: right;
  font: 0.75rem monospace;
  color: #5e6770;
}
.pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.pills span {
  font-size: 0.75rem;
  padding: 5px 10px;
  border: 1px solid #b7b6ae;
}
.source-note {
  font-size: 0.8125rem;
  color: #5e626b;
  margin: 30px 0 60px;
}
.lab-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.lab-heading h1 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.lab-heading h1 span {
  display: inline-block;
  font: bold 0.9375rem "AWAPHs Arabic", Arial;
  background: var(--yellow);
  border: var(--line);
  padding: 5px;
  transform: rotate(-7deg);
  margin-right: 8px;
}
.lab-tools {
  display: flex;
  gap: 10px;
}
.lab-tools button {
  font-size: 0.75rem;
  padding: 8px 11px;
  border: 1px solid #92958f;
  background: #fffdf6;
}
.steps {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 10px 0 25px;
  border: var(--line);
  background: #fffdf6;
}
.steps li {
  flex: 1;
  padding: 12px 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.75rem;
  border-left: 1px solid #c2bfb4;
}
.steps li:last-child {
  border: 0;
}
.steps li b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #a3a49e;
  border-radius: 50%;
  font: 0.75rem "AWAPHs Arabic", Arial;
}
.steps li.current {
  background: var(--yellow);
  font-weight: 800;
}
.steps li.done {
  background: #e2ebdf;
}
.steps li.done b {
  background: #426c51;
  color: white;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
}
.scene-panel {
  border: var(--line);
  background: #e9eef0;
  overflow: hidden;
}
.scene-header {
  padding: 12px 17px;
  background: #fffdf6;
  border-bottom: var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
}
.scene-header > span:last-child {
  font-weight: 400;
  color: #606b75;
}
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--red);
  border-radius: 50%;
  margin-left: 5px;
}
.canvas-wrap {
  position: relative;
  background: #e6edf2;
  aspect-ratio: 900/580;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.scene-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  max-width: 55%;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 7px 13px;
  background: var(--yellow);
  border: var(--line);
  box-shadow: 3px 3px var(--ink);
  transform: rotate(-2deg);
}
.scene-footer {
  padding: 13px 17px;
  background: #fffdf6;
  border-top: var(--line);
  min-height: 95px;
}
.scene-footer span {
  font-size: 0.8125rem;
  display: block;
  line-height: 1.9;
}
.scene-footer small {
  display: block;
  font-size: 0.75rem;
  color: #66717a;
  margin-top: 8px;
}
.control-panel {
  border: var(--line);
  background: #fffdf6;
  padding: 23px;
  box-shadow: 4px 4px var(--ink);
}
.step-kicker {
  font: 0.75rem monospace;
  color: var(--red);
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.control-panel h2 {
  font-size: 1.3125rem;
  margin-bottom: 10px;
}
.control-panel p {
  font-size: 0.8125rem;
  color: #59616a;
}
.actions {
  display: grid;
  gap: 9px;
}
.action {
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: right;
  padding: 11px;
  border: 1px solid #a6aaa8;
  background: #f5f3ec;
  font-size: 0.8125rem;
  min-height: 48px;
}
.action.ready {
  border: 2px solid var(--ink);
  background: #fff2b5;
  box-shadow: 2px 2px var(--ink);
}
.action.complete {
  opacity: 1;
  background: #e7efe5;
  border-color: #7e9b7a;
  color: #396548;
}
.action > span {
  font-size: 1.125rem;
  min-width: 22px;
}
.action:not(:disabled):hover {
  background: var(--yellow);
}
#status {
  font-size: 0.75rem;
  color: #3a674e;
  min-height: 24px;
  margin: 12px 0;
}
.external-note {
  padding: 11px;
  background: #eef0f6;
  border-right: 3px solid var(--blue);
  font-size: 0.75rem;
  line-height: 2;
  margin-bottom: 18px;
}
.external-note b {
  display: block;
  color: var(--blue);
  font-size: 0.75rem;
}
.control-panel > .primary {
  width: 100%;
  font-size: 0.8125rem;
  padding: 11px 16px;
}
.timer-panel {
  position: absolute;
  top: 75px;
  left: 16px;
  background: #fffdf2;
  border: var(--line);
  padding: 9px;
  box-shadow: 3px 3px var(--ink);
  font-size: 0.75rem;
  max-width: 170px;
  display: grid;
  gap: 4px;
}
.timer-panel strong {
  font: 700 1.375rem monospace;
}
.timer-panel label {
  font-size: 0.75rem;
}
.timer-panel select {
  display: block;
  width: 100%;
  font-size: 0.75rem;
  background: #f4e8b2;
  border: 1px solid;
  padding: 3px;
  margin: 4px 0;
}
.timer-panel button {
  font-size: 0.75rem;
  text-decoration: underline;
}
.protocol-details {
  margin: 24px 0 45px;
  border: 1px solid #b9bab3;
  padding: 14px 20px;
  font-size: 0.8125rem;
  background: #f9f7ef;
}
.protocol-details summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}
.protocol-details ol {
  padding-right: 20px;
  line-height: 2.2;
}
.protocol-details li {
  margin: 13px 0;
}
.protocol-details a {
  font-size: 0.75rem;
}
.quiz-heading {
  margin: 15px 0 30px;
}
.quiz-heading h1 {
  font-size: 2.0625rem;
}
.quiz-heading h1 span {
  color: var(--red);
}
.quiz-heading p {
  color: #5e6670;
  font-size: 0.75rem;
}
.external-tag {
  font-size: 0.75rem;
  color: #56648c;
}
.quiz-card {
  max-width: 790px;
  margin: 0 auto 70px;
  background: #fffdf6;
  border: var(--line);
  padding: 35px;
  box-shadow: 6px 6px var(--ink);
}
.quiz-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: #6d7378;
}
.quiz-progress {
  height: 6px;
  background: #e6e0d4;
  margin: 14px 0 25px;
}
.quiz-progress span {
  height: 100%;
  display: block;
  background: var(--red);
  transition: width 0.3s;
}
.quiz-card h2 {
  font-size: 1.3125rem;
}
.answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.answer {
  padding: 15px;
  text-align: right;
  background: #f5f1e7;
  border: var(--line);
  font-size: 0.75rem;
}
.answer:hover:not(:disabled) {
  background: var(--yellow);
}
.answer:disabled {
  opacity: 1;
}
.answer.correct {
  background: #dcebdc;
  border-color: #508460;
}
.answer.wrong {
  background: #ffe0dc;
  border-color: #c54843;
}
.feedback {
  margin: 20px 0;
  font-size: 0.75rem;
  line-height: 2;
}
.result {
  text-align: center;
}
.result .score {
  font: 900 5rem "AWAPHs Arabic", Arial;
  color: var(--blue);
  margin: 18px;
}
.result .result-icon {
  font-size: 2.5rem;
}
.result-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}
.secondary {
  border: var(--line);
  padding: 12px 20px;
  font-size: 0.75rem;
  background: var(--yellow);
  box-shadow: 3px 3px var(--ink);
}
dialog {
  width: min(1100px, 94vw);
  max-height: 90vh;
  overflow: auto;
  background: var(--paper);
  border: 3px solid var(--ink);
  padding: 25px;
}
dialog::backdrop {
  background: #19212bcc;
}
dialog img {
  width: 100%;
  display: block;
  margin: 15px 0;
}
dialog p,
dialog a {
  font-size: 0.75rem;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-head h2 {
  margin: 0;
  font-size: 1.25rem;
}
.dialog-head button {
  font-size: 1.375rem;
}
body.reduced * {
  animation: none !important;
  scroll-behavior: auto !important;
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
@media (min-width: 1450px) {
  .hero {
    gap: 100px;
  }
  .hero h1 {
    font-size: 4.0625rem;
  }
}
@media (max-width: 1000px) {
  .page {
    padding: 0 25px;
  }
  .hero {
    gap: 30px;
  }
  .hero h1 {
    font-size: 2.8125rem;
  }
  .lab-grid {
    gap: 12px;
  }
  .card-body {
    padding: 15px 10px;
  }
  .card-body h3 {
    font-size: 0.75rem;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr) 285px;
  }
  .control-panel {
    padding: 17px;
  }
  .edition {
    display: none;
  }
  .lab-heading h1 {
    font-size: 1.3125rem;
  }
  .lab-tools {
    flex-direction: column;
  }
  footer {
    margin: 0 25px;
  }
}
@media (max-width: 800px) {
  .topbar {
    padding: 17px 20px;
  }
  .brand b {
    font-size: 1.4375rem;
  }
  .brand small {
    font-size: 0.75rem;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 1.4375rem;
  }
  .brand-mark span {
    top: 13px;
    font-size: 1.0625rem;
  }
  nav {
    gap: 10px;
    font-size: 0.75rem;
  }
  /* زر «المختبرات» بقائمة المختبر بس (الشعار يرجّع نفس المكان). كان «nav button:first-child» ويخفي أول زر بأي قائمة. */
  .topbar nav > button[data-nav="home"] {
    display: none;
  }
  .page {
    padding: 0 20px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 35px;
    padding: 40px 0;
  }
  .hero-copy {
    text-align: center;
  }
  .hero h1 {
    font-size: 2.8125rem;
    line-height: 1.6;
  }
  .hero p {
    font-size: 0.8125rem;
  }
  .hero-meta {
    justify-content: center;
    font-size: 0.75rem;
  }
  .hero-art {
    width: 90%;
    max-width: 430px;
    justify-self: center;
  }
  .section-heading {
    display: block;
  }
  .section-heading h2 {
    font-size: 1.1875rem;
  }
  .availability {
    display: block;
    margin-top: 10px;
    font-size: 0.75rem;
  }
  .lab-grid {
    grid-template-columns: 1fr 1fr;
    gap: 17px;
  }
  .card-art {
    height: 130px;
  }
  .card-body {
    padding: 14px;
    min-height: 145px;
  }
  .card-body h3 {
    font-size: 0.75rem;
  }
  .card-body small {
    font-size: 0.75rem;
  }
  .how-strip {
    padding: 20px 12px;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: start;
  }
  .strip-title {
    width: 100%;
    font-size: 0.875rem;
  }
  .strip-title br {
    display: none;
  }
  .how-strip div {
    font-size: 0.75rem;
    gap: 7px;
  }
  .how-strip b {
    font-size: 1.4375rem;
  }
  .strip-star {
    display: none;
  }
  footer {
    flex-wrap: wrap;
    gap: 15px;
  }
  footer > span {
    width: 100%;
  }
  .catalog-head h1 {
    font-size: 1.875rem;
  }
  .experiment-card {
    grid-template-columns: 1fr;
  }
  .experiment-cover {
    min-height: 210px;
    border-left: 0;
    border-bottom: var(--line);
  }
  .molecule {
    font-size: 9.375rem;
    top: 0;
  }
  .experiment-info {
    padding: 23px;
  }
  .experiment-info h2 {
    font-size: 1.3125rem;
  }
  .lab-heading {
    display: block;
  }
  .lab-heading h1 {
    font-size: 1.1875rem;
  }
  .lab-tools {
    flex-direction: row;
    margin-bottom: 20px;
  }
  .steps li {
    flex-direction: column;
    font-size: 0.75rem;
    gap: 4px;
    padding: 8px 2px;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .control-panel {
    padding: 22px;
  }
  .scene-badge {
    font-size: 0.75rem;
    top: 12px;
    right: 12px;
    padding: 5px 8px;
  }
  .scene-header {
    font-size: 0.75rem;
  }
  .scene-footer span {
    font-size: 0.75rem;
  }
  .timer-panel {
    top: 50px;
    left: 8px;
    padding: 5px;
    max-width: 123px;
  }
  .timer-panel strong {
    font-size: 0.9375rem;
  }
  .timer-panel label {
    font-size: 0.75rem;
  }
  .timer-panel select,
  .timer-panel button {
    font-size: 0.75rem;
  }
  .quiz-heading h1 {
    font-size: 1.5625rem;
  }
  .quiz-card {
    padding: 22px;
  }
  .quiz-card h2 {
    font-size: 1.0625rem;
  }
  .answers {
    grid-template-columns: 1fr;
  }
  .quiz-top {
    font-size: 0.75rem;
  }
  .action {
    font-size: 0.75rem;
  }
  .control-panel p {
    font-size: 0.75rem;
  }
}
.scene-badge {
  max-width: 35%;
  font-size: 0.75rem;
}
.timer-panel {
  left: auto;
  right: 14px;
  max-width: 30%;
  top: 105px;
}
@media (max-width: 800px) {
  .scene-badge {
    font-size: 0.75rem;
  }
  .timer-panel {
    right: 10px;
    top: 85px;
  }
  .scene-panel {
    scroll-margin-top: 12px;
  }
}
@media (max-width: 430px) {
  .scene-badge {
    font-size: 0.75rem;
    right: 8px;
    top: 8px;
    padding: 4px 5px;
  }
  .timer-panel {
    top: 55px;
    right: 8px;
    max-width: 30%;
    font-size: 0.75rem;
  }
  .timer-panel strong {
    font-size: 0.8125rem;
  }
  .timer-panel select {
    font-size: 0.75rem;
  }
}

.topbar .nav-channel {
  color: var(--blue);
  text-decoration: none;
}
.topbar .nav-channel:hover,
.channel-link:hover {
  text-decoration: underline;
}
footer .channel-link {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--blue);
  text-decoration: none;
}
@media (max-width: 740px) {
  nav {
    gap: 9px;
  }
  .topbar .nav-channel {
    font-size: 0.75rem;
  }
  .brand small {
    max-width: 140px;
    line-height: 1.3;
  }
}

.brand-logo {
  width: 55px;
  height: 55px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  flex: none;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 50%;
}
.footer-brand span {
  color: var(--ink);
  margin: 0;
}
@media (max-width: 740px) {
  .brand-logo {
    width: 42px;
    height: 42px;
  }
  .brand {
    gap: 8px;
  }
  .brand b {
    font-size: 1.25rem;
  }
  .brand small {
    font-size: 0.75rem;
  }
  .footer-logo {
    width: 30px;
    height: 30px;
  }
}
@media (max-width: 740px) {
  .topbar #source-open {
    display: none;
  }
}

.site-home-link {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
}
.site-home-link:hover {
  text-decoration: underline;
}

.brand small {
  white-space: nowrap;
}
.topbar nav a {
  white-space: nowrap;
}
@media (max-width: 420px) {
  .topbar:not(.theory-topbar) .brand small {
    display: none;
  }
}

/* تعديل ليلي باليد: كلمة الكومك تبقى فاتحة بحد غامق مثل النهاري. */
html[data-theme="dark"] .pow {
  color: #fffdf6;
  -webkit-text-stroke: 1px #19212b;
  text-shadow: 3px 3px #19212b;
}
html[data-theme="dark"] .card-number {
  color: #19212b;
}

/* ===== قراءة مريحة (2026-11-22): نص القراءة 16px والثانوي 14px على الأقل. ===== */
body {
  font-size: 1rem;
}
.control-panel p,
.protocol-details,
.how-strip div,
.source-note,
.feedback,
.answer,
.quiz-heading p,
.external-note,
.steps li {
  font-size: 0.9375rem;
  line-height: 1.8;
}

.hero-meta,
.art-caption,
.availability,
.card-state,
.card-bottom,
footer,
.text-back,
.pills span,
.lab-tools button,
.scene-header,
.scene-footer small,
#status,
.external-note b,
.timer-panel,
.timer-panel label,
.timer-panel select,
.timer-panel button,
.protocol-details a,
.external-tag,
.quiz-top,
.secondary,
dialog a,
.primary,
.action {
  font-size: 0.875rem;
}
.control-panel p,
.protocol-details,
.source-note,
.feedback {
  max-width: 70ch;
}

/* ===== تصادمات بالموبايل (2026-11-22) ===== */
@media (max-width: 800px) {
  /* nav ينكسر سطرين بدل ما يطلع برا الشاشة (رابط «الملزمة الأصلية» بإعادة التبلور). */
  .topbar nav {
    flex-wrap: wrap;
    row-gap: 6px;
  }
}
@media (max-width: 560px) {
  /* بكروت LABVERSE الضيقة: «LAB / 02» و«متاح الآن» كانوا فوگ بعض؛ الرقم ينزل لزاوية الصورة التحتانية. */
  .card-number {
    top: auto;
    bottom: 8px;
  }
  .lab-icon {
    width: 82px;
    height: 82px;
    margin-top: 18px;
  }
}

/* ===== الوضع الليلي (مولّد تلقائياً بـ npm run build:dark، لا تعدله يدوياً) ===== */
html[data-theme="dark"] {
  color-scheme: dark;
  --dark-line: #3d4757;
  --dark-hard: #030508;
}
html[data-theme="dark"] {
  --paper: #0a0f15;
  --ink: #e6e9ed;
  --red: #ff6356;
  --blue: #6897ff;
  --yellow: #e5c959;
}
html[data-theme="dark"] body {
  background: var(--paper);
  color: var(--ink);
}
html[data-theme="dark"] button:focus-visible,
html[data-theme="dark"] a:focus-visible,
html[data-theme="dark"] summary:focus-visible,
html[data-theme="dark"] select:focus-visible {
  outline: 3px solid var(--blue);
}
html[data-theme="dark"] .topbar {
  border-bottom: var(--line);
}
html[data-theme="dark"] .brand-dot {
  color: var(--red);
}
html[data-theme="dark"] .brand-mark {
  background: #c53a33;
  border: var(--line);
  box-shadow: 3px 3px var(--dark-hard);
}
html[data-theme="dark"] .brand-mark span {
  color: var(--yellow);
}
html[data-theme="dark"] nav button:hover {
  color: var(--red);
}
html[data-theme="dark"] .eyebrow i,
html[data-theme="dark"] .availability i {
  background: #c53a33;
}
html[data-theme="dark"] .underlined:after {
  color: #19212b;
  background: var(--yellow);
}
html[data-theme="dark"] .hero p {
  color: #a7b0bb;
}
html[data-theme="dark"] .primary {
  background: #c53a33;
  border: var(--line);
  box-shadow: 4px 4px var(--dark-hard);
}
html[data-theme="dark"] .primary:not(:disabled):hover {
  box-shadow: 6px 6px var(--dark-hard);
}
html[data-theme="dark"] .hero-meta {
  color: #bababa;
}
html[data-theme="dark"] .hero-meta span:before {
  color: var(--red);
}
html[data-theme="dark"] .hero-art {
  background: #13283b;
  border: 3px solid var(--dark-line);
  box-shadow: 9px 9px var(--dark-hard);
  background-image: radial-gradient(#759bcb40 1px, transparent 1px);
}
html[data-theme="dark"] .panel-corner {
  color: #19212b;
  background: var(--yellow);
  border-bottom: var(--line);
  border-right: var(--line);
}
html[data-theme="dark"] .hero-flask {
  filter: drop-shadow(9px 10px 0 #acd2ff26);
}
html[data-theme="dark"] .orbit {
  border: 1px solid #a6d1f733;
}
html[data-theme="dark"] .bubble-label {
  background: #121820;
  border: var(--line);
}
html[data-theme="dark"] .art-caption {
  color: #19212b;
  background: var(--yellow);
  border-top: var(--line);
  border-left: var(--line);
}
html[data-theme="dark"] .availability i {
  background: #70a993;
}
html[data-theme="dark"] .lab-card {
  border: var(--line);
  background: #0f151d;
  box-shadow: 4px 4px var(--dark-hard);
}
html[data-theme="dark"] .card-art {
  background: var(--card-color);
  border-bottom: var(--line);
  background-image: radial-gradient(#c4d0f224 1px, transparent 1px);
}
html[data-theme="dark"] .card-state {
  border: 1px solid var(--dark-line);
  background: #11171d;
}
html[data-theme="dark"] .card-state.available {
  color: #19212b;
  background: var(--yellow);
}
html[data-theme="dark"] .card-body small {
  color: #a8acb6;
}
html[data-theme="dark"] .card-bottom {
  color: #a8adb4;
}
html[data-theme="dark"] .card-arrow {
  border: 1px solid var(--dark-line);
  color: var(--ink);
}
html[data-theme="dark"] .lab-card.active .card-arrow {
  background: #c53a33;
}
html[data-theme="dark"] .how-strip {
  border-top: var(--line);
  border-bottom: var(--line);
  background: #05080e;
}
html[data-theme="dark"] .how-strip b {
  color: var(--blue);
}
html[data-theme="dark"] .strip-star {
  color: var(--red);
}
html[data-theme="dark"] footer {
  border-top: 1px solid #464e5840;
  color: #a7a7a7;
}
html[data-theme="dark"] .footer-brand {
  color: var(--ink);
}
html[data-theme="dark"] .footer-brand span {
  color: var(--red);
}
html[data-theme="dark"] .text-back {
  color: #a8adb4;
}
html[data-theme="dark"] .catalog-head h1 span {
  color: var(--blue);
}
html[data-theme="dark"] .catalog-head p {
  color: #a7aeb5;
}
html[data-theme="dark"] .experiment-card {
  border: var(--line);
  box-shadow: 6px 6px var(--dark-hard);
  background: #11171f;
}
html[data-theme="dark"] .experiment-cover {
  background: #c53a33;
  border-left: var(--line);
  background-image: radial-gradient(#e6e9ed44 1px, transparent 1px);
}
html[data-theme="dark"] .issue {
  color: #19212b;
  background: var(--yellow);
  border: var(--line);
}
html[data-theme="dark"] .molecule {
  color: #302509;
  text-shadow: 4px 4px var(--dark-hard);
}
html[data-theme="dark"] .cover-tag {
  background: #11171f;
  border: var(--line);
}
html[data-theme="dark"] .english {
  color: #9fa9b3;
}
html[data-theme="dark"] .pills span {
  border: 1px solid #64635c;
}
html[data-theme="dark"] .source-note {
  color: #a8acb6;
}
html[data-theme="dark"] .lab-heading h1 span {
  color: #19212b;
  background: var(--yellow);
  border: var(--line);
}
html[data-theme="dark"] .lab-tools button {
  border: 1px solid #777a74;
  background: #11171f;
}
html[data-theme="dark"] .steps {
  border: var(--line);
  background: #11171f;
}
html[data-theme="dark"] .steps li {
  border-left: 1px solid #04080d;
}
html[data-theme="dark"] .steps li b {
  border: 1px solid #6a6b65;
}
html[data-theme="dark"] .steps li.current {
  color: #19212b;
  background: var(--yellow);
}
html[data-theme="dark"] .steps li.done {
  background: #1b2c15;
}
html[data-theme="dark"] .steps li.done b {
  background: #90bd9f;
  color: #121923;
}
html[data-theme="dark"] .scene-panel {
  border: var(--line);
  background: #050c16;
}
html[data-theme="dark"] .scene-header {
  background: #11171f;
  border-bottom: var(--line);
}
html[data-theme="dark"] .scene-header > span:last-child {
  color: #9aa6b0;
}
html[data-theme="dark"] .live-dot {
  background: #c53a33;
}
html[data-theme="dark"] .canvas-wrap {
  background: #040b16;
}
html[data-theme="dark"] .scene-badge {
  color: #19212b;
  background: var(--yellow);
  border: var(--line);
  box-shadow: 3px 3px var(--dark-hard);
}
html[data-theme="dark"] .scene-footer {
  background: #11171f;
  border-top: var(--line);
}
html[data-theme="dark"] .scene-footer small {
  color: #949fa9;
}
html[data-theme="dark"] .control-panel {
  border: var(--line);
  background: #11171f;
  box-shadow: 4px 4px var(--dark-hard);
}
html[data-theme="dark"] .step-kicker {
  color: var(--red);
}
html[data-theme="dark"] .control-panel p {
  color: #a6afb9;
}
html[data-theme="dark"] .action {
  border: 1px solid #626664;
  background: #0a1017;
}
html[data-theme="dark"] .action.ready {
  border: 2px solid var(--dark-line);
  background: #312500;
  box-shadow: 2px 2px var(--dark-hard);
}
html[data-theme="dark"] .action.complete {
  background: #040c12;
  border-color: #85a281;
  color: #97c6a5;
}
html[data-theme="dark"] .action:not(:disabled):hover {
  color: #19212b;
  background: var(--yellow);
}
html[data-theme="dark"] #status {
  color: #94c3a7;
}
html[data-theme="dark"] .external-note {
  background: #070d19;
  border-right: 3px solid var(--blue);
}
html[data-theme="dark"] .external-note b {
  color: var(--blue);
}
html[data-theme="dark"] .timer-panel {
  background: #11171d;
  border: var(--line);
  box-shadow: 3px 3px var(--dark-hard);
}
html[data-theme="dark"] .timer-panel select {
  background: #302600;
}
html[data-theme="dark"] .protocol-details {
  border: 1px solid #63645e;
  background: #0d131a;
}
html[data-theme="dark"] .quiz-heading h1 span {
  color: var(--red);
}
html[data-theme="dark"] .quiz-heading p {
  color: #a1aab5;
}
html[data-theme="dark"] .external-tag {
  color: #9aaad6;
}
html[data-theme="dark"] .quiz-card {
  background: #11171f;
  border: var(--line);
  box-shadow: 6px 6px var(--dark-hard);
}
html[data-theme="dark"] .quiz-top {
  color: #959ca1;
}
html[data-theme="dark"] .quiz-progress {
  background: #05070d;
}
html[data-theme="dark"] .quiz-progress span {
  background: #c53a33;
}
html[data-theme="dark"] .answer {
  background: #0a0f15;
  border: var(--line);
}
html[data-theme="dark"] .answer:hover:not(:disabled) {
  color: #19212b;
  background: var(--yellow);
}
html[data-theme="dark"] .answer.correct {
  background: #172c18;
  border-color: #73a882;
}
html[data-theme="dark"] .answer.wrong {
  background: #3a1d1a;
  border-color: #f27168;
}
html[data-theme="dark"] .result .score {
  color: var(--blue);
}
html[data-theme="dark"] .secondary {
  color: #19212b;
  border: var(--line);
  background: var(--yellow);
  box-shadow: 3px 3px var(--dark-hard);
}
html[data-theme="dark"] dialog {
  background: var(--paper);
  border: 3px solid var(--dark-line);
}
html[data-theme="dark"] dialog::backdrop {
  background: #e6e9edcc;
}
@media (max-width: 800px) {
  html[data-theme="dark"] .experiment-cover {
    border-bottom: var(--line);
  }
}
html[data-theme="dark"] .topbar .nav-channel {
  color: var(--blue);
}
html[data-theme="dark"] footer .channel-link {
  color: var(--blue);
}
html[data-theme="dark"] .brand-logo {
  background: #121923;
}
html[data-theme="dark"] .footer-brand span {
  color: var(--ink);
}
html[data-theme="dark"] .site-home-link {
  color: var(--blue);
}
