@font-face {
  font-family: "Dana";
  src: url("/assets/fonts/dana/Dana-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Dana";
  src: url("/assets/fonts/dana/Dana-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Dana";
  src: url("/assets/fonts/dana/Dana-DemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Dana";
  src: url("/assets/fonts/dana/Dana-Bold.woff2") format("woff2");
  font-weight: 700 800;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/vazirmatn-400.woff2") format("woff2");
  font-weight: 400;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/vazirmatn-500.woff2") format("woff2");
  font-weight: 500;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/vazirmatn-700.woff2") format("woff2");
  font-weight: 700;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/vazirmatn-800.woff2") format("woff2");
  font-weight: 800;
}

:root {
  --bg: #eef4f8;
  --page: #f8fbfd;
  --surface: #ffffff;
  --surface-2: #f1f7fa;
  --text: #101828;
  --muted: #667085;
  --line: #d7e1ea;
  --line-strong: #c7d4e1;
  --primary: #0f766e;
  --primary-2: #13887f;
  --primary-soft: #d9f4ef;
  --mint: #18a999;
  --mint-soft: #ddf8f3;
  --violet: #7457d8;
  --violet-soft: #eee9ff;
  --blue: #315baf;
  --blue-soft: #e6efff;
  --amber: #b45309;
  --amber-soft: #fff2d7;
  --danger: #b42318;
  --danger-soft: #fee4e2;
  --shadow-soft: 0 16px 44px rgba(30, 47, 67, 0.08);
  --shadow-card: 0 8px 20px rgba(16, 24, 40, 0.05);
  --motion-fast: 140ms ease;
  --motion-normal: 220ms ease;
  --motion-slow: 360ms ease;
  font-family: "Dana", "Vazirmatn", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Dana", "Vazirmatn", Tahoma, Arial, sans-serif;
  overflow-x: hidden;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

@keyframes page-enter {
  from {
    opacity: 0.98;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes skeleton-wave {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  button,
  a,
  input,
  .stat-card,
  .category-shortcut,
  .exam-card,
  .track-row,
  .home-panel,
  .exam-table article,
  .custom-select > button,
  .mobile-exam-row,
  .bottom-nav button,
  .drawer-panel,
  .page-preloader {
    transition:
      background-color var(--motion-normal),
      border-color var(--motion-normal),
      color var(--motion-normal),
      box-shadow var(--motion-normal),
      opacity var(--motion-normal),
      transform var(--motion-normal);
  }
}

@keyframes text-marquee {
  0%,
  18% {
    transform: translateX(0);
  }
  82%,
  100% {
    transform: translateX(calc(100% - var(--marquee-width, 100%)));
  }
}

.truncate-line {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marquee-line {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.marquee-line > span {
  display: inline-block;
  min-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.marquee-line:hover > span,
.marquee-line:focus-within > span {
  overflow: visible;
  text-overflow: clip;
  transform: translateX(-18%);
  transition: transform 2.6s ease;
}

.app-shell {
  min-height: 100vh;
  padding: 18px;
}

.page-preloader {
  position: fixed;
  left: 50%;
  top: 18px;
  z-index: 300;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: 0 16px 44px rgba(16, 24, 40, 0.12);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -14px);
}

.page-preloader .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.page-preloader .brand-mark span {
  font-size: 18px;
}

.page-preloader strong {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.route-loading .page-preloader {
  opacity: 1;
  transform: translate(-50%, 0);
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.88), transparent 30%),
    linear-gradient(135deg, #0f766e, #1d8fb3);
  color: #fff;
  position: relative;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.16);
  overflow: hidden;
  flex: 0 0 auto;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-top-color: transparent;
  border-left-color: transparent;
  border-radius: 9px;
  transform: rotate(-12deg);
}

.brand-mark span {
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  transform: translateY(-1px);
}

.brand-mark svg {
  position: absolute;
  left: 7px;
  bottom: 7px;
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

.product-shell {
  width: min(100%, 1360px);
  min-height: calc(100vh - 36px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  direction: ltr;
}

.product-shell.focus-mode {
  max-width: 720px;
  grid-template-columns: 1fr;
}

.product-shell > * {
  direction: rtl;
}

.desktop-sidebar {
  grid-column: 2;
  grid-row: 1;
  background: #ffffff;
  color: var(--text);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid var(--line);
}

.mobile-drawer {
  display: none;
}

.skeleton-box,
.skeleton-line,
.skeleton-dot,
.skeleton-card span,
.skeleton-card strong,
.skeleton-card small,
.skeleton-card h3,
.skeleton-card p,
.skeleton-card div,
.skeleton-filter {
  background: linear-gradient(90deg, #edf3f7 0%, #f8fbfd 48%, #edf3f7 100%);
  background-size: 220% 100%;
  animation: skeleton-wave 1.35s ease-in-out infinite;
}

.skeleton-shell {
  min-height: calc(100vh - 36px);
}

.skeleton-line {
  height: 42px;
  border-radius: 8px;
}

.skeleton-line.wide {
  width: 100%;
}

.skeleton-line.short {
  width: 72%;
}

.skeleton-dot {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-block;
}

.skeleton-card {
  pointer-events: none;
}

.skeleton-card span,
.skeleton-card strong,
.skeleton-card small,
.skeleton-card h3,
.skeleton-card p,
.skeleton-card div {
  display: block;
  border-radius: 8px;
  color: transparent;
}

.skeleton-card span {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
}

.skeleton-card strong,
.skeleton-card h3 {
  width: 74%;
  height: 18px;
  margin: 0 auto 10px;
}

.skeleton-card small,
.skeleton-card p {
  width: 58%;
  height: 12px;
  margin: 0 auto;
}

.skeleton-card div {
  width: 100%;
  height: 42px;
  margin-top: auto;
}

.skeleton-filter {
  min-height: 112px;
  border-radius: 8px;
}

.side-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
}

.avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.side-brand strong,
.side-brand small {
  display: block;
  text-align: right;
}

.side-brand strong {
  color: var(--primary);
  font-size: 22px;
  font-weight: 600;
}

.side-brand small {
  color: var(--muted);
  margin-top: 0;
  font-size: 12px;
}

.side-brand > svg {
  color: var(--primary);
  width: 44px;
  height: 44px;
  stroke-width: 1.8;
}

.desktop-sidebar nav {
  display: grid;
  gap: 8px;
}

.desktop-sidebar nav button,
.side-support button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 14px;
  background: transparent;
  color: #5d6677;
  text-align: right;
  font-weight: 600;
}

.desktop-sidebar nav button.active,
.desktop-sidebar nav button:hover {
  background: linear-gradient(90deg, rgba(24, 169, 153, 0.10), rgba(49, 91, 175, 0.10));
  color: var(--primary);
}

.desktop-sidebar nav button svg,
.side-support svg {
  margin-right: auto;
}

.side-support {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.product-main {
  grid-column: 1;
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--page);
}

.app-header {
  padding: 18px 34px 14px;
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(320px, 520px) minmax(220px, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.header-brand {
  display: none;
}

.domain {
  color: var(--primary);
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.app-header h1 {
  margin: 0;
  font-size: clamp(20px, 1.95vw, 25px);
  font-weight: 600;
  line-height: 1.35;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: var(--surface);
  color: var(--primary);
}

.icon-btn svg,
.desktop-sidebar nav svg,
.side-support svg,
.bottom-nav svg {
  stroke-width: 1.8;
}

.top-search {
  grid-column: 2;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: var(--text);
  box-shadow: var(--shadow-card);
}

.top-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--muted);
  background: transparent;
}

.header-actions {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-chip {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--text);
}

.user-chip span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(#eef1f5, #d7dde6);
  display: block;
  position: relative;
}

.user-chip span::before,
.user-chip span::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #a9b1bd;
}

.user-chip span::before {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  top: 10px;
}

.user-chip span::after {
  width: 22px;
  height: 11px;
  border-radius: 12px 12px 0 0;
  top: 25px;
}

.screen {
  overflow: auto;
  padding: 0 34px 34px;
  animation: page-enter var(--motion-normal) both;
}

.search-box {
  height: 58px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
  color: var(--primary);
}

.mobile-search {
  display: none;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.stats-row,
.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.home-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.result-grid {
  grid-template-columns: repeat(4, 1fr);
}

.stat-card,
.exam-card,
.question-card,
.profile-card,
.history-item,
.empty-state,
.result-hero,
.detail-hero,
.auth-card,
.info-list article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
}

.stat-card {
  padding: 16px;
  min-height: 98px;
  min-width: 0;
}

.home-stat {
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.home-stat > div {
  min-width: 0;
}

.home-stat > svg {
  width: 44px;
  height: 44px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 50%;
  padding: 11px;
  stroke-width: 1.8;
}

.home-stat:nth-child(2) > svg {
  color: var(--primary);
  background: var(--mint-soft);
}

.home-stat:nth-child(3) > svg {
  color: var(--violet);
  background: var(--violet-soft);
}

.home-stat:nth-child(4) > svg {
  color: #0b8068;
  background: #def7ec;
}

.home-stat small {
  display: block;
  color: var(--muted);
  margin-top: 7px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-card strong {
  font-size: 25px;
  font-weight: 600;
  line-height: 1;
}

.section-block {
  margin-bottom: 30px;
}

.section-heading {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.section-heading span,
.section-heading button {
  color: var(--muted);
  font-size: 13px;
}

.section-heading button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 500;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
}

.category-shortcut,
.compact-category-list button {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 16px 14px;
  text-align: right;
  min-height: 150px;
  box-shadow: var(--shadow-card);
  transition: 0.18s ease;
}

.category-shortcut:hover,
.compact-category-list button:hover,
.exam-card:hover {
  border-color: #a9c8c5;
  transform: translateY(-1px);
}

.category-shortcut span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 50%;
  margin: 2px auto 14px;
}

.category-shortcut span svg {
  width: 29px;
  height: 29px;
  stroke-width: 1.85;
}

.category-shortcut strong,
.compact-category-list strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 6px;
  text-align: center;
}

.category-shortcut small,
.compact-category-list small,
.exam-card p,
.history-item small {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-shortcut strong,
.category-shortcut small,
.compact-category-list strong,
.compact-category-list small {
  white-space: nowrap;
}

.tone-blue span,
.mini-icon.tone-blue { background: #eaf3ff; color: #276fc8; }
.tone-violet span { background: #f0ecff; color: #684ed2; }
.tone-amber span,
.mini-icon.tone-amber { background: #fff5df; color: #e09a00; }
.tone-orange span { background: #fff0e7; color: #ea6b11; }
.tone-purple span,
.mini-icon.tone-purple { background: #eee9ff; color: #6647db; }
.tone-green span,
.mini-icon.tone-green { background: #e5f8ef; color: #159666; }
.tone-red span { background: #fdeceb; color: #a94438; }
.tone-teal span,
.mini-icon.tone-teal { background: #e1f6f3; color: var(--primary); }
.mini-icon.tone-pink { background: #fdeaf2; color: #d83d76; }

.filter-panel {
  position: sticky;
  top: 12px;
  z-index: 20;
  min-height: 112px;
  display: grid;
  grid-template-columns: 120px repeat(3, minmax(140px, 1fr)) minmax(260px, 1.35fr);
  gap: 18px;
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-card);
  overflow: visible;
}

.custom-select {
  display: grid;
  gap: 7px;
  position: relative;
  z-index: 30;
}

.custom-select:focus-within,
.custom-select:hover {
  z-index: 80;
}

.custom-select > span {
  color: var(--muted);
  font-size: 13px;
}

.custom-select > button,
.filter-search,
.filter-search input {
  height: 50px;
}

.custom-select > button,
.filter-search {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.custom-select > button {
  padding: 0 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
}

.custom-select > button {
  white-space: nowrap;
}

.custom-select > button i {
  flex: 0 0 auto;
}

.custom-select ul {
  list-style: none;
  margin: 6px 0 0;
  padding: 6px;
  display: none;
  position: absolute;
  z-index: 90;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.12);
}

.custom-select:hover ul,
.custom-select:focus-within ul {
  display: grid;
}

.custom-select li {
  min-height: 36px;
  padding: 0;
  border-radius: 7px;
  color: #475467;
}

.custom-select li button {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  padding: 8px 10px;
  background: transparent;
  color: inherit;
  text-align: right;
}

.custom-select li:hover,
.custom-select li button:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.primary-filter {
  height: 54px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f766e, #1d8fb3);
  color: #fff;
  font-weight: 600;
}

.filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--text);
}

.filter-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exam-table {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.exam-table header,
.exam-table article {
  display: grid;
  grid-template-columns: 2fr 1fr 0.8fr 0.9fr 0.8fr 1fr 110px;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 0 18px;
}

.exam-table header {
  color: var(--muted);
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}

.exam-table article {
  border-bottom: 1px solid #edf1f5;
  color: #4b5565;
  transition: background 0.16s ease;
}

.exam-table article:hover {
  background: #fbfdff;
}

.exam-title-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  min-width: 0;
}

.exam-title-cell strong {
  font-weight: 600;
  min-width: 0;
}

.mini-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  flex: 0 0 auto;
}

.mini-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.85;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
}

.difficulty-آسان { background: #e3f5e8; color: #168550; }
.difficulty-متوسط { background: #fff2d8; color: #c26a00; }
.difficulty-سخت { background: #ffe4e4; color: #d92d20; }
.audience { background: #e8f4ef; color: #17815e; }

.exam-table button {
  min-height: 34px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  transition: 0.16s ease;
}

.exam-table button:hover {
  background: var(--primary);
  color: #fff;
}

.exam-table footer {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--blue);
  font-weight: 500;
  font-size: 13px;
  background: linear-gradient(90deg, rgba(49, 91, 175, 0.04), rgba(24, 169, 153, 0.05));
}

.home-continuation {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
  gap: 16px;
  margin-bottom: 10px;
}

.home-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  padding: 18px;
}

.compact-heading {
  min-height: auto;
  margin-bottom: 12px;
}

.compact-heading h2 {
  font-size: 17px;
}

.track-list,
.update-list {
  display: grid;
  gap: 10px;
}

.track-row {
  min-height: 74px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--text);
  padding: 10px 12px;
  text-align: right;
  transition: 0.16s ease;
  min-width: 0;
}

.track-row > div,
.update-list article > div {
  min-width: 0;
}

.track-row:hover {
  border-color: #bad5d2;
  background: #fff;
}

.track-row > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.track-row > span svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.85;
}

.track-row strong,
.update-list strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
}

.track-row small,
.update-list small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-row > svg {
  color: var(--muted);
}

.update-list article {
  min-height: 62px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #edf1f5;
  padding-bottom: 10px;
}

.update-list article:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.update-list article > svg {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 50%;
  color: var(--amber);
  background: var(--amber-soft);
  stroke-width: 1.85;
}

.mobile-exam-list {
  display: none;
}

.card-list.mobile-exam-list {
  display: none;
}

.card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.exams-card-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.exam-card {
  padding: 20px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}

.exam-list-card {
  min-height: 210px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  align-items: start;
  gap: 12px;
}

.exam-list-card > .mini-icon {
  grid-column: 1;
  grid-row: 1;
}

.exam-list-card > div:first-of-type {
  grid-column: 2;
  grid-row: 1 / 3;
  min-width: 0;
}

.exam-list-card .meta-row,
.exam-list-card .exam-card-actions {
  grid-column: 1 / -1;
}

.exam-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
}

.exam-card p {
  margin: 0 0 16px;
  line-height: 1.9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.exam-access-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  width: fit-content;
  margin-bottom: 7px;
  padding-inline: 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.assigned-exams-section {
  margin-bottom: 16px;
}

.meta-row,
.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.meta-row span,
.chip {
  white-space: nowrap;
  border: 0;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 500;
}

.primary-btn,
.secondary-btn,
.danger-btn {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  width: 100%;
  font-weight: 600;
}

.primary-btn {
  background: var(--primary);
  color: #fff;
}

.primary-btn:hover {
  background: var(--primary-2);
}

.secondary-btn {
  background: var(--blue-soft);
  color: var(--blue);
}

.danger-btn {
  background: var(--danger-soft);
  color: var(--danger);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.danger-btn:disabled {
  cursor: wait;
  opacity: 0.65;
}

.exam-card-actions,
.exam-actions,
.action-stack {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 10px;
  margin-top: 18px;
}

.chip-row {
  margin-bottom: 14px;
}

.chip.active,
.segment .active {
  background: var(--primary);
  color: #fff;
}

.segment {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: #e8eef5;
  padding: 5px;
  border-radius: 8px;
  margin-bottom: 22px;
}

.segment button {
  border: 0;
  border-radius: 8px;
  background: transparent;
  min-height: 40px;
  color: var(--muted);
  font-weight: 500;
}

.compact-category-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.compact-category-list button {
  min-height: 118px;
  display: grid;
  grid-template-rows: 40px auto auto;
  justify-items: center;
  align-items: center;
  gap: 6px;
  padding: 14px 12px;
}

.compact-category-list .mini-icon {
  width: 40px;
  height: 40px;
}

.compact-category-list .mini-icon svg {
  width: 20px;
  height: 20px;
}

.categories-root-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.categories-root-grid .category-shortcut {
  min-height: 148px;
}

.categories-child-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.categories-search {
  position: sticky;
  top: 12px;
  z-index: 20;
}

.bottom-nav {
  display: none;
}

.exam-screen {
  padding: 22px;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  gap: 16px;
  overflow: hidden;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

.exam-topbar {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 12px;
}

.exam-topbar strong,
.exam-topbar span {
  display: block;
}

.exam-topbar span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.timer {
  background: var(--amber-soft);
  color: var(--amber);
  border-radius: 8px;
  padding: 9px 12px;
  font-weight: 600;
}

.progress-track {
  height: 7px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  background: var(--primary);
}

.active-question {
  padding: 22px;
  overflow: auto;
}

.question-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
}

.question-meta button {
  border: 0;
  background: transparent;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.active-question h2 {
  margin: 0 0 20px;
  font-size: 21px;
  line-height: 1.7;
}

.answer-list {
  display: grid;
  gap: 10px;
}

.answer-option {
  min-height: 58px;
  border: 1px solid var(--line);
  background: #fbfdff;
  border-radius: 8px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: right;
}

.answer-option.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.answer-option i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-style: normal;
}

.question-dots {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.question-dots button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.question-dots .active {
  background: var(--primary);
  color: #fff;
}

.question-dots .answered:not(.active) {
  background: var(--primary-soft);
  color: var(--primary);
}

.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;
}

.focus-mode {
  grid-template-columns: 1fr;
  background: #f5f7fb;
}

.focus-mode .product-main {
  min-width: 0;
}

.exam-screen {
  max-width: 1180px;
  grid-template-rows: auto auto auto 1fr;
  overflow: visible;
}

.exam-topbar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.exam-topbar .icon-btn {
  border-color: var(--line);
}

.exam-topbar .timer {
  margin: 0;
  min-width: 94px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.exam-progress-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.exam-save-state {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.exam-save-state svg {
  width: 17px;
  height: 17px;
  color: var(--primary);
}

.exam-save-state.error,
.exam-save-state.offline {
  color: var(--danger);
}

.exam-save-state.error svg,
.exam-save-state.offline svg {
  color: var(--danger);
}

.exam-save-state button {
  border: 0;
  background: transparent;
  color: var(--primary);
  text-decoration: underline;
}

.exam-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.exam-navigator {
  position: sticky;
  top: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px;
}

.navigator-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.navigator-heading strong,
.navigator-heading small {
  display: block;
}

.navigator-heading small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.navigator-heading button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.question-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(36px, 1fr));
  gap: 8px;
}

.question-map button {
  position: relative;
  min-width: 38px;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
  font-weight: 600;
}

.question-map button.answered {
  border-color: rgba(15, 118, 110, 0.28);
  background: var(--primary-soft);
  color: var(--primary);
}

.question-map button.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.question-map button.flagged::after {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--amber);
}

.question-map button svg {
  display: none;
}

.question-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding-top: 14px;
  color: var(--muted);
  font-size: 10px;
}

.question-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.question-map-legend i {
  width: 9px;
  height: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
}

.question-map-legend i.answered {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.question-map-legend i.flagged {
  border-color: var(--amber);
  background: var(--amber);
  border-radius: 50%;
}

.active-question,
.exam-review {
  min-height: 510px;
  border-radius: 12px;
  overflow: visible;
}

.question-kicker {
  margin: 0 0 5px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.active-question h1,
.exam-review h1 {
  margin: 0 0 22px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.8;
  outline: 0;
}

.flag-question.active {
  color: var(--amber);
  font-weight: 600;
}

fieldset.answer-list {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

.answer-option {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 28px;
  gap: 11px;
  cursor: pointer;
}

.answer-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.answer-option > i {
  width: 30px;
  height: 30px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 12px;
}

.answer-option > b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: #fff;
}

.answer-option.selected > i,
.answer-option.selected > b {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.answer-option:has(input:focus-visible) {
  outline: 3px solid rgba(15, 118, 110, 0.2);
  outline-offset: 2px;
}

.exam-actions {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  padding-top: 24px;
  margin-top: auto;
}

.exam-actions .primary-btn,
.exam-actions .secondary-btn {
  width: auto;
  min-width: 128px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.exam-actions .review-action {
  justify-self: center;
  border-color: transparent;
  background: transparent;
  color: var(--primary);
}

.review-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: start;
}

.review-heading > i {
  width: 54px;
  height: 54px;
  padding: 13px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
}

.review-heading span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.review-heading h1 {
  margin: 5px 0;
}

.review-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.review-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 22px 0;
}

.review-summary .stat-card {
  min-height: 86px;
}

.review-question-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.review-question-list button {
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 10px 12px;
  text-align: right;
}

.review-question-list button small {
  color: var(--muted);
  grid-column: 1;
}

.review-question-list button > i {
  grid-column: 2;
  grid-row: 1 / 3;
}

.review-question-list button.unanswered {
  border-color: rgba(220, 38, 38, 0.24);
  background: var(--danger-soft);
}

.review-question-list button.flagged {
  box-shadow: inset -3px 0 var(--amber);
}

.review-submit-actions {
  grid-template-columns: 1fr 1fr;
}

.review-submit-actions .primary-btn,
.review-submit-actions .secondary-btn {
  width: 100%;
}

.answer-review-list {
  display: grid;
  gap: 12px;
}

.answer-review-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.answer-review-card > header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.answer-review-card > header span {
  color: var(--muted);
}

.answer-review-card.correct > header strong {
  color: var(--primary);
}

.answer-review-card.wrong > header strong,
.answer-review-card.unanswered > header strong {
  color: var(--danger);
}

.answer-review-card h3 {
  margin: 12px 0;
  font-size: 16px;
  line-height: 1.8;
}

.question-media {
  display: grid;
  width: min(100%, 720px);
  margin: 18px auto 24px;
  padding: 10px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
  color: var(--muted);
  text-align: center;
}
.question-media img { display: block; width: 100%; height: auto; max-height: 480px; object-fit: contain; border-radius: 11px; }
.question-media span { font-size: 12px; }
.question-media.compact { max-width: 520px; margin: 12px 0 18px; }
.option-media {
  grid-column: 2;
  display: grid;
  width: min(100%, 480px);
  margin-top: 8px;
  padding: 8px;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}
.option-media img { display: block; width: 100%; height: auto; max-height: 260px; object-fit: contain; border-radius: 8px; }
.option-media span { font-size: 11px; }
.image-zoom-dialog { width: min(94vw, 1100px); max-height: 92vh; padding: 46px 14px 14px; border: 0; border-radius: 18px; background: #111827; }
.image-zoom-dialog::backdrop { background: rgba(2, 6, 23, .82); }
.image-zoom-dialog img { display: block; width: 100%; max-height: calc(92vh - 64px); object-fit: contain; }
.image-zoom-dialog button { position: absolute; top: 9px; left: 11px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: white; color: #111827; font-size: 24px; }

.reviewed-options {
  display: grid;
  gap: 7px;
}

.reviewed-options > div {
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
}
.reviewed-options .option-media { grid-column: 1 / -1; }

.reviewed-options > div.correct {
  border-color: rgba(15, 118, 110, 0.28);
  background: var(--primary-soft);
}

.reviewed-options > div.selected:not(.correct) {
  border-color: rgba(220, 38, 38, 0.25);
  background: var(--danger-soft);
}

.reviewed-options small {
  color: var(--muted);
  white-space: nowrap;
}

.answer-review-card > p {
  margin: 13px 0 0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 11px;
  color: var(--muted);
  line-height: 1.9;
}

.detail-hero,
.auth-card,
.result-hero {
  padding: 22px;
  margin-bottom: 18px;
}

.detail-hero span,
.result-hero span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}

.detail-hero h2 {
  margin: 8px 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.45;
}

.detail-hero p {
  color: var(--muted);
  line-height: 1.9;
  margin: 0 0 16px;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.info-list article {
  padding: 14px;
}

.info-list strong,
.info-list small {
  display: block;
}

.info-list small {
  color: var(--muted);
  margin-top: 6px;
}

.result-hero {
  text-align: center;
}

.result-hero h2 {
  margin: 8px 0 10px;
  font-size: 18px;
  font-weight: 600;
}

.result-hero strong {
  display: block;
  font-size: 52px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1;
}

.result-hero em {
  display: inline-block;
  margin-top: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 8px;
  padding: 7px 13px;
  font-style: normal;
  font-weight: 500;
}

.performance-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 10px;
}

.performance-row div,
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.performance-row p {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 0;
}

.performance-row i {
  display: block;
  height: 100%;
  background: var(--primary);
}

.profile-card {
  padding: 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.profile-card h2,
.profile-card p {
  margin: 0;
}

.profile-card p {
  color: var(--muted);
  margin-top: 4px;
  font-size: 13px;
}

.profile-card .secondary-btn {
  width: auto;
  min-height: 40px;
}

.profile-card .profile-logout {
  width: auto;
  min-height: 40px;
  padding-inline: 18px;
}

.history-item {
  padding: 16px;
}

.history-item span {
  color: var(--primary);
  font-weight: 600;
  font-size: 19px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.auth-brand h2,
.auth-brand p {
  margin: 0;
}

.auth-brand p {
  color: var(--muted);
  margin-top: 4px;
  font-size: 13px;
}

.auth-segment {
  margin-bottom: 14px;
}

.auth-form {
  display: grid;
}

.auth-message {
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.8;
}

.auth-message.error {
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid rgba(220, 38, 38, 0.16);
}

.auth-message.success {
  color: var(--primary-strong, #0f766e);
  background: var(--primary-soft, #ecfdf5);
  border: 1px solid rgba(15, 118, 110, 0.18);
}

.profile-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.account-panel {
  min-width: 0;
}

.readonly-field input {
  color: var(--muted);
  background: #f1f5f9;
  cursor: not-allowed;
}

.readonly-field small,
.session-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.session-panel {
  margin-bottom: 16px;
}

.session-heading,
.session-heading > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.session-heading > div {
  flex: 1;
}

.session-list {
  display: grid;
  gap: 10px;
}

.session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.session-item > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.current-session-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-inline-start: 6px;
  padding-inline: 8px;
  border-radius: 999px;
  background: var(--primary-soft, #ecfdf5);
  color: var(--primary-strong, #0f766e);
  font-size: 11px;
  vertical-align: middle;
}

.compact-btn {
  width: auto;
  min-width: 72px;
  min-height: 44px;
  padding-inline: 12px;
}

@media (max-width: 760px) {
  .profile-settings-grid {
    grid-template-columns: 1fr;
  }

  .session-heading,
  .session-heading > div,
  .session-item {
    align-items: stretch;
    flex-direction: column;
  }

  .session-heading .compact-btn,
  .session-item .compact-btn {
    width: 100%;
  }
}

.auth-required-card {
  max-width: 560px;
  margin-inline: auto;
}

.result-save-state {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.field span {
  color: var(--muted);
  font-size: 12px;
}

.field input {
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 0 12px;
  outline: 0;
}

.field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.link-btn {
  width: 100%;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--primary);
  margin-top: 8px;
}

.empty-state,
.loading {
  padding: 18px;
  text-align: center;
  color: var(--muted);
}

.home-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fbfdff;
}

.home-empty svg {
  color: var(--muted);
}

.home-empty strong {
  color: var(--text);
  font-weight: 600;
}

.home-empty button {
  min-height: 38px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 8px 14px;
  background: #fff;
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 820px) {
  html,
  body {
    direction: rtl;
  }

  .app-shell {
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    direction: rtl;
  }

  .product-shell {
    width: 100%;
    max-width: 100%;
    margin: 0;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    grid-template-columns: 1fr;
    box-shadow: none;
    overflow-x: hidden;
  }

  .desktop-sidebar {
    display: none;
  }

  .mobile-drawer {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 120;
    pointer-events: none;
    visibility: hidden;
  }

  .mobile-drawer.open {
    pointer-events: auto;
    visibility: visible;
  }

  .drawer-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(16, 24, 40, 0);
    transition: background 0.2s ease;
  }

  .mobile-drawer.open .drawer-backdrop {
    background: rgba(16, 24, 40, 0.26);
  }

  .drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(284px, 82vw);
    height: 100vh;
    transform: translateX(100%);
    transition: transform 0.22s ease;
    background: #fff;
    border-left: 1px solid var(--line);
    box-shadow: -20px 0 44px rgba(16, 24, 40, 0.14);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .mobile-drawer.open .drawer-panel {
    transform: translateX(0);
  }

  .drawer-panel nav {
    display: grid;
    gap: 8px;
  }

  .drawer-panel nav button,
  .drawer-panel .side-support button {
    min-height: 48px;
    border: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    background: transparent;
    color: #5d6677;
    text-align: right;
    font-weight: 600;
  }

  .drawer-panel nav button.active {
    background: linear-gradient(90deg, rgba(24, 169, 153, 0.10), rgba(49, 91, 175, 0.10));
    color: var(--primary);
  }

  .product-main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    direction: rtl;
    min-height: 100vh;
    grid-template-rows: auto 1fr auto;
  }

  .app-header {
    padding: 16px 18px 14px;
    min-height: 92px;
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    border-bottom: 1px solid var(--line);
    direction: rtl;
  }

  .header-brand {
    display: grid;
    grid-column: 2;
    justify-items: center;
    gap: 1px;
    text-align: center;
    direction: rtl;
  }

  .header-brand .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .header-brand .brand-mark span {
    font-size: 17px;
  }

  .header-brand .brand-mark svg {
    width: 11px;
    height: 11px;
    left: 5px;
    bottom: 5px;
  }

  .domain {
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
  }

  .app-header h1 {
    color: var(--primary);
    font-size: 18px;
    font-weight: 600;
  }

  .top-search {
    display: none;
  }

  .header-actions {
    display: contents;
  }

  .header-actions .icon-btn {
    grid-column: 3;
    grid-row: 1;
    border: 0;
    background: transparent;
    color: var(--text);
  }

  .user-chip {
    grid-column: 1;
    grid-row: 1;
    min-width: 42px;
    width: 42px;
    height: 42px;
    font-size: 0;
    position: relative;
  }

  .user-chip::before,
  .user-chip::after,
  .user-chip span {
    display: none;
  }

  .user-chip::before {
    content: "";
    display: block;
    width: 26px;
    height: 2px;
    background: var(--text);
    box-shadow: 0 8px 0 var(--text), 0 16px 0 var(--text);
    position: absolute;
    right: 8px;
    top: 12px;
  }

  .screen {
    padding: 0 0 92px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    direction: rtl;
  }

  .screen > * {
    width: auto;
    max-width: none;
    margin-left: 18px;
    margin-right: 18px;
    direction: rtl;
  }

  .mobile-search {
    display: flex;
    margin-top: -2px;
  }

  .search-box {
    height: 50px;
    margin-bottom: 14px;
  }

  .home-stats {
    width: auto;
    max-width: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 22px;
    overflow: hidden;
    direction: rtl;
  }

  .home-stats .home-stat {
    direction: rtl;
  }

  .home-stats .home-stat:nth-child(4) {
    display: none;
  }

  .home-stats .home-stat:nth-child(3) {
    grid-column: 1 / -1;
  }

  .home-stats .home-stat {
    min-width: 0;
    max-width: none;
  }

  .stat-card {
    min-height: 102px;
    padding: 12px;
  }

  .stat-card strong {
    font-size: 19px;
    white-space: nowrap;
  }

  .home-stat {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    grid-template-rows: auto auto;
    gap: 6px 10px;
    align-items: center;
    overflow: hidden;
  }

  .home-stat > div {
    display: contents;
  }

  .home-stat span {
    grid-column: 1;
    grid-row: 1;
  }

  .home-stat strong {
    grid-column: 1;
    grid-row: 2;
  }

  .home-stat small {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .home-stat span,
  .home-stat small,
  .home-stat strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-stat > svg {
    grid-column: 2;
    grid-row: 1 / 3;
    width: 42px;
    height: 42px;
  }

  .home-stat small {
    font-size: 12px;
  }

  .section-heading h2 {
    font-size: 16px;
  }

  .shortcut-grid {
    width: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow-x: hidden;
    padding-bottom: 4px;
    max-width: none;
    direction: rtl;
    scrollbar-width: none;
  }

  .categories-root-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .categories-child-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .categories-search {
    top: 8px;
  }

  .shortcut-grid .category-shortcut {
    direction: rtl;
  }

  .shortcut-grid::-webkit-scrollbar {
    display: none;
  }

  .category-shortcut {
    width: 100%;
    min-height: 122px;
    padding: 12px;
    display: grid;
    grid-template-rows: 50px auto auto;
    align-items: center;
  }

  .category-shortcut span {
    width: 50px;
    height: 50px;
    margin: 0 auto 8px;
  }

  .category-shortcut span svg {
    width: 25px;
    height: 25px;
  }

  .category-shortcut:nth-child(n + 7) {
    display: none;
  }

  .category-shortcut strong {
    font-size: 13px;
  }

  .card-list,
  .info-list {
    grid-template-columns: 1fr;
  }

  .exams-card-list {
    grid-template-columns: 1fr;
  }

  .exam-list-card {
    min-height: 176px;
    padding: 14px;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
  }

  .exam-list-card h3 {
    font-size: 15px;
  }

  .exam-list-card p {
    font-size: 12px;
    line-height: 1.8;
    margin-bottom: 10px;
  }

  .exam-list-card .meta-row {
    gap: 6px;
  }

  .exam-list-card .exam-card-actions {
    margin-top: 8px;
  }

  .exam-list-card .primary-btn,
  .exam-list-card .secondary-btn {
    min-height: 42px;
    font-size: 13px;
  }

  .compact-category-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .compact-category-list button {
    min-height: 104px;
    padding: 12px 10px;
  }

  .filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
    margin-bottom: 18px;
    overflow: visible;
    direction: rtl;
    top: 8px;
  }

  .exams-filter-panel {
    grid-template-columns: 1fr;
  }

  .exams-filter-panel .primary-filter {
    display: none;
  }

  .exams-filter-panel .filter-search {
    display: flex;
  }

  .exams-filter-panel .filter-search {
    grid-column: 1;
  }

  .home-continuation {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .home-panel {
    padding: 14px;
  }

  .track-row {
    grid-template-columns: 42px minmax(0, 1fr) 24px;
    min-height: 70px;
  }

  .track-row > span {
    width: 42px;
    height: 42px;
  }

  .update-panel {
    display: none;
  }

  .custom-select,
  .custom-select > button {
    min-width: 0;
    width: 100%;
  }

  .filter-panel .primary-filter,
  .filter-panel .filter-search {
    display: none;
  }

  .exam-table {
    display: none;
  }

  .mobile-exam-list {
    display: grid;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
  }

  .mobile-exam-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 82px;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #edf1f5;
  }

  .mobile-exam-row > div {
    min-width: 0;
  }

  .mobile-exam-row h3 {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.5;
  }

  .mobile-exam-row p {
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
  }

  .mobile-exam-row button {
    min-height: 40px;
    border: 1px solid var(--primary);
    border-radius: 8px;
    background: #fff;
    color: var(--primary);
    font-weight: 600;
    font-size: 12px;
  }

  .bottom-nav {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 8px 10px 10px;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(14px);
  }

  .bottom-nav button {
    border: 0;
    background: transparent;
    border-radius: 8px;
    min-height: 54px;
    color: var(--muted);
    display: grid;
    place-items: center;
    font-size: 12px;
  }

  .bottom-nav button i {
    width: 19px;
    height: 19px;
  }

  .bottom-nav .active {
    background: var(--primary-soft);
    color: var(--primary);
  }

  .exam-screen {
    padding: 12px 12px 24px;
    max-width: none;
    gap: 12px;
  }

  .exam-screen > * {
    margin-left: 0;
    margin-right: 0;
  }

  .exam-topbar {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px;
  }

  .exam-topbar strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
  }

  .exam-topbar .timer {
    min-width: 76px;
    padding: 8px;
    font-size: 13px;
  }

  .exam-progress-row {
    gap: 8px;
  }

  .exam-workspace {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .exam-navigator {
    position: static;
    width: 100%;
    padding: 12px;
    order: 2;
  }

  .active-question,
  .exam-review {
    min-height: 0;
    width: 100%;
    padding: 16px;
    order: 1;
  }

  .question-map {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 3px 2px 8px;
    scroll-snap-type: x proximity;
  }

  .question-map button {
    flex: 0 0 42px;
    min-width: 42px;
    min-height: 42px;
    scroll-snap-align: center;
  }

  .question-map-legend {
    padding-top: 8px;
  }

  .active-question h1,
  .exam-review h1 {
    font-size: 18px;
    line-height: 1.85;
  }

  .question-meta {
    align-items: center;
  }

  .question-meta > span {
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .flag-question {
    min-height: 42px;
  }

  .answer-option {
    min-height: 62px;
    padding: 11px;
  }

  .exam-actions {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 18px;
  }

  .exam-actions .primary-btn,
  .exam-actions .secondary-btn {
    width: 100%;
    min-width: 0;
    min-height: 48px;
  }

  .exam-actions .review-action {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .review-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .review-summary .stat-card {
    min-height: 78px;
    padding: 9px;
  }

  .review-summary .stat-card strong {
    font-size: 19px;
  }

  .review-question-list {
    grid-template-columns: 1fr;
  }

  .review-submit-actions {
    grid-template-columns: 1fr;
  }

  .review-submit-actions .primary-btn,
  .review-submit-actions .secondary-btn {
    grid-column: 1;
  }

  .answer-review-section,
  .result-breakdown {
    margin-left: 18px;
    margin-right: 18px;
  }

  .answer-review-card {
    padding: 14px;
  }

  .reviewed-options > div {
    align-items: start;
    flex-direction: column;
  }

  .active-question h2 {
    font-size: 18px;
  }

  .result-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
