:root {
  --sky: #d5edf8;
  --sky-mid: #c0e4f5;
  --accent: #11a8f2;
  --accent-dk: #0c9ae0;
  --accent-drk: #0a86c4;
  --ink: #2c2c2c;
  --muted: #5f6770;
  --panel: #f0f6fb;
  --card: #f8f9fb;
  --footer: #093e59;
  --footer-dp: #072e42;
  --white: #ffffff;
  --r-card: 22px;
  --r-pill: 999px;
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 18px 44px rgba(17, 168, 242, 0.18);
}

.tests-page {
  background: linear-gradient(180deg, #d5edf8 0%, #eef8fc 48%, #d5edf8 100%);
}

.tests-hero,
.tests-section {
  padding: 56px 0;
}

.tests-hero-inner,
.tests-list,
.test-runner,
.test-empty {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
}

.tests-hero-inner {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding: 34px;
}

.tests-hero p,
.test-runner-head p {
  margin: 0 0 8px;
  color: var(--accent-drk);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tests-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1;
  color: var(--accent);
}

.tests-hero span,
.test-runner-head span {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.6;
}

.tests-hero-actions {
  display: grid;
  gap: 12px;
  width: min(360px, 100%);
}

.tests-search,
.admin-test-search {
  display: grid;
  gap: 8px;
}

.tests-search span,
.admin-test-search span {
  color: var(--accent-drk);
  font-size: 13px;
  font-weight: 800;
}

.tests-search input,
.admin-test-search input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 2px solid rgba(17, 168, 242, 0.2);
  border-radius: 14px;
  background: #ffffff;
  font: inherit;
  font-weight: 700;
  outline: none;
}

.tests-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.tests-list {
  display: grid;
  gap: 12px;
  padding: 22px;
  position: sticky;
  top: 102px;
}

.tests-list h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.tests-list a {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(17, 168, 242, 0.18);
  border-radius: 14px;
  background: rgba(240, 246, 251, 0.74);
  text-decoration: none;
}

.tests-list a.active {
  color: var(--white);
  background: linear-gradient(160deg, var(--accent), var(--accent-drk));
}

.tests-list [hidden] {
  display: none !important;
}

.tests-list em {
  display: -webkit-box;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.test-runner {
  padding: 28px;
}

.test-runner-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(17, 168, 242, 0.18);
}

.test-runner-head h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
}

.test-score {
  min-width: 96px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--white);
  text-align: center;
  font-size: 22px;
  font-weight: 800;
}

.test-progress {
  height: 10px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 168, 242, 0.12);
}

.test-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #16a34a, var(--accent));
  transition: width 0.25s ease;
}

.test-questions {
  display: grid;
  gap: 18px;
  margin: 24px 0;
}

.test-question {
  padding: 20px;
  border: 1px solid rgba(17, 168, 242, 0.16);
  border-radius: 18px;
  background: #ffffff;
}

.test-question h3 {
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 1.4;
}

.test-option {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  margin-top: 10px;
  padding: 10px 14px;
  border: 2px solid rgba(17, 168, 242, 0.2);
  border-radius: 14px;
  background: #f8fbfd;
  color: var(--ink);
  text-align: left;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.test-option span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(17, 168, 242, 0.12);
  color: var(--accent-drk);
}

.test-option.correct {
  border-color: #16a34a;
  background: #ecfdf3;
}

.test-option.wrong {
  border-color: #dc2626;
  background: #fef2f2;
}

.test-answer.correct {
  color: #15803d;
}

.test-answer.wrong {
  color: #b91c1c;
}

.test-final {
  margin-top: 14px;
  padding: 18px;
  border-radius: 16px;
  background: #e8f7fe;
  color: var(--accent-drk);
  font-size: 20px;
  font-weight: 800;
}

.admin-test-stats,
.admin-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.admin-quick-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(160deg, var(--accent), var(--accent-drk));
  text-decoration: none;
  font-weight: 800;
  box-shadow: var(--shadow-md);
}

.admin-test-stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-weight: 700;
}

.admin-test-stats strong {
  color: var(--accent-drk);
  font-size: 22px;
}

.admin-test-create,
.admin-test-row>form:first-of-type {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-test-create {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(17, 168, 242, 0.18);
  border-radius: 18px;
  background: rgba(240, 246, 251, 0.68);
}

.admin-test-create .wide,
.admin-test-create .test-question-editor,
.admin-test-create .book-editor-actions,
.admin-test-row .wide,
.admin-test-row .test-question-editor,
.admin-test-row .book-editor-actions {
  grid-column: 1 / -1;
}

.admin-test-create label,
.admin-test-row label {
  display: grid;
  gap: 8px;
  margin: 0;
}

.admin-test-create input,
.admin-test-create select,
.admin-test-create textarea,
.admin-test-row input,
.admin-test-row select,
.admin-test-row textarea {
  width: 100%;
  border: 2px solid rgba(17, 168, 242, 0.2);
  border-radius: 12px;
  background: #ffffff;
  padding: 12px 14px;
  font: inherit;
  outline: none;
}

.test-question-editor {
  display: grid;
  gap: 16px;
}

.book-extra-editor {
  display: grid;
  gap: 14px;
  grid-column: 1 / -1;
  margin-top: 8px;
}

.book-extra-editor h3 {
  margin: 0;
  color: #16344d;
  font-size: 18px;
}

.test-question-field {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(17, 168, 242, 0.2);
  border-radius: 16px;
}

.test-question-field legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 0 8px;
  color: var(--accent-drk);
  font-weight: 800;
}

.test-question-field legend button {
  border: 0;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
}

.test-question-field label:first-of-type {
  grid-column: 1 / -1;
}

details.admin-test-row {
  display: block;
  padding: 0;
  overflow: hidden;
}

.admin-test-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}

.admin-test-summary::-webkit-details-marker {
  display: none;
}

.admin-test-summary::after {
  content: "ÃƒÆ’Ã‚ÂÃƒâ€¦Ã‚Â¾ÃƒÆ’Ã¢â‚¬ËœÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡ÃƒÆ’Ã‚ÂÃƒâ€šÃ‚ÂºÃƒÆ’Ã¢â‚¬ËœÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÆ’Ã¢â‚¬ËœÃƒÂ¢Ã¢â€šÂ¬Ã‚Â¹ÃƒÆ’Ã¢â‚¬ËœÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡ÃƒÆ’Ã¢â‚¬ËœÃƒâ€¦Ã¢â‚¬â„¢";
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(17, 168, 242, 0.12);
  color: var(--accent-drk);
  font-size: 12px;
  font-weight: 800;
}

details[open] .admin-test-summary::after {
  content: "ÃƒÆ’Ã‚ÂÃƒâ€šÃ‚Â¡ÃƒÆ’Ã‚ÂÃƒâ€šÃ‚ÂºÃƒÆ’Ã¢â‚¬ËœÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÆ’Ã¢â‚¬ËœÃƒÂ¢Ã¢â€šÂ¬Ã‚Â¹ÃƒÆ’Ã¢â‚¬ËœÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡ÃƒÆ’Ã¢â‚¬ËœÃƒâ€¦Ã¢â‚¬â„¢";
}

.admin-test-summary span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-test-summary em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.admin-test-summary small {
  color: var(--accent-drk);
  font-weight: 800;
  white-space: nowrap;
}

.admin-test-row>form {
  padding: 0 20px 18px;
}

@media (max-width: 900px) {

  .tests-layout,
  .test-runner-head,
  .admin-test-create,
  .admin-test-row>form:first-of-type,
  .test-question-field {
    grid-template-columns: 1fr;
  }

  .tests-hero-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .tests-list {
    position: static;
  }
}

.page-online-text {
  background:
    radial-gradient(circle at 10% 0%, rgba(17, 168, 242, 0.14), transparent 30%),
    linear-gradient(180deg, #fbfdff 0%, #f4f8fb 100%);
}

.page-online-test {
  background:
    radial-gradient(circle at 10% 0%, rgba(17, 168, 242, 0.14), transparent 30%),
    linear-gradient(180deg, #fbfdff 0%, #f4f8fb 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  color: var(--ink);
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.45), transparent 38%), linear-gradient(180deg, #ddeef6 0%, #8bb7cb 100%);
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

iframe {
  display: block;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  position: fixed;
  width: 100%;
  top: 0;
  background-color: #cbcbcb26;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 78px;
  padding: 10px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px 8px 10px;
  text-decoration: none;
  border-radius: 20px;
  font-size: 20px;
  font-weight: 600;
  color: #00447aed;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.main-nav,
.topnav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  flex-wrap: wrap;
}

.main-nav a,
.topnav a,
.lang {
  padding: 10px 18px;
  border-radius: 20px;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.main-nav a:nth-of-type(1) {
  margin-left: auto;
}

.main-nav a:not(.active):hover,
.topnav a:not(.active):hover,
.lang:hover {
  background: rgba(17, 168, 242, 0.1);
}

.main-nav a {
  position: relative;
}

.main-nav a.active::before {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  border-radius: 2px;
  background: #0067b9ed;
}

.main-nav a.active,
.topnav a.active {
  color: #00447aed;
  /* background: linear-gradient(160deg, var(--accent), var(--accent-drk)); */
  /* box-shadow: 0 4px 14px rgba(17, 168, 242, 0.35); */
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 4px 4px 10px;
  border: 1px solid rgba(17, 168, 242, 0.16);
  border-radius: 30px;
  background: rgb(255 255 255 / 57%);
  flex-shrink: 0;
  margin-left: auto;
}

.lang-globe {
  flex-shrink: 0;
  margin-left: 5px;
  color: #0067b9ed;
}

@media (max-width: 1090px) {
  .lang-globe {
    display: none;
  }

  .main-nav a.active::before {
    display: none;
  }
}

.lang-switch a {
  min-width: 42px;
  padding: 8px 10px;
  border-radius: 10px;
  color: #38566c;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

.lang-switch a.active,
.lang-switch a:hover {
  /* background: #11a8f2; */
  color: #00447aed;
}

.lang-switch a.active::before {
  display: none;
}

[dir="rtl"] body {
  text-align: right;
}

[dir="rtl"] .nav-wrap,
[dir="rtl"] .topbar-inner,
[dir="rtl"] .book-reader-head,
[dir="rtl"] .footer-bottom {
  direction: rtl;
}

[dir="rtl"] .book-open,
[dir="rtl"] .topic-card,
[dir="rtl"] .specialty-filter-card,
[dir="rtl"] .admin-panel label,
[dir="rtl"] .reader-page {
  text-align: right;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(17, 168, 242, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  place-items: center;
  gap: 4px;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: #007fc2;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.lang {
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 113px 0 80px;
}

.hero-bg-arc {
  position: absolute;
  inset: -240px auto auto 50%;
  transform: translateX(-50%);
  width: min(92vw, 980px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%,
      rgba(255, 255, 255, 0.72) 0%,
      rgba(190, 228, 248, 0.28) 54%,
      transparent 76%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 48px;
  flex-wrap: nowrap;
  justify-content: space-around;
  align-items: flex-start;
}

.hero-left {
  position: relative;
  z-index: 3;
}

.hero-title {
  margin: 0 0 12px;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: clamp(72px, 10vw, 132px);
  font-weight: 200;
  line-height: 0.92;
  letter-spacing: -9px;
  color: #0067b9ed;
  text-shadow: 0 4px 24px rgba(17, 168, 242, 0.16);
}

.hero-sub {
  margin: 0 0 15px;
  max-width: 500px;
  font-size: 16px;
  width: 100%;
  font-weight: 700;
  line-height: 1.55;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
  color: #0a4574;
  /* margin-left: 10%; */
}

.hero-panel {
  padding: 14px 24px;
  /* background: rgba(240, 246, 251, 0.88); */
  /* border: 1px solid rgba(255, 255, 255, 0.65); */
  border-radius: 28px;
  /* box-shadow: 0 20px 45px rgba(17, 168, 242, 0.1); */
  /* width: 80%; */
}

.hero-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  justify-content: center;
}

.tab {
  padding: 12px 0px;
  border-radius: 14px;
  border: 2px solid rgba(17, 168, 242, 0.35);
  background: transparent;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #0e70be;
  transition: all 0.2s;
  max-width: 300px;
  min-width: 139px;
  text-align: center;
}

.tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tab.active {
  color: var(--white);
  background: linear-gradient(160deg, var(--accent), var(--accent-drk));
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

.topic-list {
  display: grid;
  gap: 9px;
}

.topic-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 16px;
  padding: 9px 18px;
  border-radius: 18px;
  color: #0f70be;
  background: #fdfdfd;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  width: 90%;
  min-width: 330px;
  margin: 0 auto;
  line-height: 1.4;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
}

.topic-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(17, 168, 242, 0.28);
}

.topic-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: rgb(15 159 230);
  border-radius: 10px;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60%;
  pointer-events: none;
}

.hero-ring {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(72vw, 620px);
  aspect-ratio: 1;
  border: 8px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  box-shadow: 0 0 0 1px rgba(17, 168, 242, 0.08),
    inset 0 0 80px rgba(255, 255, 255, 0.12);
}

.sketchfab-embed-wrapper {
  position: relative;
  z-index: 2;
  width: min(100%, 760px);
  height: min(78vw, 700px);
  min-height: 540px;
  filter: drop-shadow(0 24px 48px rgba(0, 77, 122, 0.12));
}

.sketchfab-embed-wrapper iframe {
  width: 100%;
  height: 77%;
  border: 0;
  background: transparent;
}

.leaders {
  position: relative;
  padding: 118px 0 80px;
  background: linear-gradient(180deg, #10a4e8 0%, #0d8fd0 100%);
}

.leaders-shell {
  width: min(860px, 100%);
  margin: 0 auto;
}

.leaders-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 22px;
  min-height: 128px;
  border-radius: 24px;
  background: #ffffff;
  border: 14px solid #1d9eee;
  box-shadow: var(--shadow-sm);
  margin-top: -180px;
}

.leaders-badge {
  flex: 0 0 66px;
}

.leaders-badge img {
  width: 66px;
  height: 66px;
  object-fit: contain;
}

.leaders-copy p {
  margin: 0 0 4px;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.leaders-copy h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  color: var(--ink);
}

.leaders-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 28px;
}

.leader-row {
  display: grid;
  grid-template-columns: 54px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px 22px;
  min-height: 78px;
  border-radius: 18px;
  background: var(--white);
  border: 3px solid transparent;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s;
}

.leader-row:hover {
  transform: translateX(4px);
}

.leader-row.first {
  border-color: #f6b800;
}

.leader-row.second {
  border-color: #c8c8c8;
}

.leader-row.third {
  border-color: #e07244;
}

.leader-place {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  background: #b0d8f0;
}

.leader-row.first .leader-place {
  background: #f6b800;
}

.leader-row.second .leader-place {
  background: #c0c0c0;
}

.leader-row.third .leader-place {
  background: #e07244;
}

.leader-avatar {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: linear-gradient(145deg, #b9c3cc, #8f9ba5);
  display: block;
  overflow: hidden;
  flex: 0 0 50px;
}

.leader-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.leader-name {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.leader-name small {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  color: rgba(20, 44, 61, 0.62);
}

.leader-score {
  min-width: 52px;
  text-align: right;
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
}

.leader-row.first .leader-score {
  color: #f6b800;
}

.leader-row.second .leader-score {
  color: #aaaaaa;
}

.leader-row.third .leader-score {
  color: #e07244;
}

.footer {
  position: relative;
  padding-top: 28px;
  background: linear-gradient(180deg, var(--footer) 0%, var(--footer-dp) 100%);
  color: rgba(255, 255, 255, 0.88);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(2, minmax(160px, 0.7fr));
  gap: 28px;
  padding: 38px 32px 30px;
  margin-top: 0;
  background: linear-gradient(180deg, rgb(11, 55, 78) 0%, rgb(8, 46, 66) 100%);
  border-radius: 34px 34px 0 0;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.08);
  margin-top: -80px;
}

.footer-brand {
  margin-bottom: 22px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  color: #ffffff;
  font-size: 22px;
  box-shadow: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.32);
}

.footer-brand span {
  color: #ffffff;
}

.footer-brand img {
  width: 44px;
  height: 44px;
}

.footer-about p {
  max-width: 520px;
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

.footer-icons {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
}

.fi-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(17, 168, 242, 0.25);
  font-size: 22px;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.2s;
}

.fi-icon:hover {
  background: rgba(17, 168, 242, 0.45);
}

.address {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
}

.footer-col h3 {
  margin: 14px 0 18px;
  color: var(--white);
  text-transform: uppercase;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.footer-col a {
  display: block;
  margin-bottom: 12px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.62);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.4;
  transition: color 0.18s;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.44);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 1180px) {
  .hero {
    padding: 103px 0 72px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-left {
    max-width: 640px;
  }

  .hero-sub {
    max-width: 440px;
    /* text-align: center; */
  }

  .hero-visual {
    min-height: 0;
    height: min(80vw, 620px);
  }

  .hero-ring {
    width: min(74vw, 540px);
  }

  .sketchfab-embed-wrapper {
    width: min(100%, 640px);
    height: 100%;
    min-height: 0;
  }

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

@media (max-width: 1090px) {
  .nav-wrap {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    min-height: auto;
    padding: 8px 0;
  }

  .menu-toggle {
    display: grid;
  }

  .main-nav,
  .topnav {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    padding: 8px 0 4px;
    flex-direction: column;
    align-items: stretch;
  }

  .brand {
    width: fit-content;
  }

  .main-nav.open,
  .topnav.open {
    display: flex;
  }

  .main-nav a,
  .topnav a,
  .lang {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    text-align: left;
  }

  .lang {
    align-self: center;
  }

  .main-nav .lang-switch,
  .topnav .lang-switch {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    border-radius: 10px;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    justify-content: flex-start;
    width: fit-content;
    padding: 6px 12px 6px 8px;
    border-radius: 14px;
    font-size: 17px;
  }

  .hero-inner {
    align-items: center;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .hero {
    padding: 20px 0 56px;
  }

  .hero-title {
    font-size: clamp(58px, 22vw, 86px);
  }

  .hero-sub {
    margin-bottom: 28px;
    font-size: 14px;
  }

  .hero-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .hero-tabs {
    margin-bottom: 18px;
  }

  .tab {
    width: 100%;
    text-align: center;
    font-size: 15px;
    padding: 10px 16px;
  }

  .topic-card {
    grid-template-columns: 44px 1fr;
    gap: 12px;
    padding: 12px 14px;
    min-height: 64px;
    font-size: 14px;
  }

  .topic-icon {
    width: 38px;
    height: 38px;
  }

  .hero-visual {
    min-height: 0;
    height: min(100vw, 420px);
  }

  .hero-ring {
    width: min(88vw, 360px);
    border-width: 5px;
  }

  .sketchfab-embed-wrapper {
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .leaders {
    padding: 78px 0 56px;
  }

  .leaders-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 16px;
    border-width: 10px;
    min-height: 0;
    margin-top: -52px;
  }

  .leaders-list {
    gap: 12px;
  }

  .leader-row {
    grid-template-columns: 42px 42px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .leader-place {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .leader-avatar {
    width: 42px;
    height: 42px;
  }

  .leader-name {
    font-size: 15px;
    line-height: 1.35;
  }

  .leader-score {
    grid-column: 2 / 4;
    justify-self: end;
    font-size: 22px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 28px 18px 22px;
    border-radius: 24px 24px 0 0;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    padding-bottom: 24px;
  }
}

.page-atlas {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), transparent 34%),
    linear-gradient(180deg, #dff3fc 0%, #eef8fd 58%, #d4eef9 100%);
}

.atlas-main {
  position: relative;
  padding: 30px 0 0;
}

.atlas-hero {
  position: relative;
  padding: 18px 0 54px;
}

.atlas-shell {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(360px, 1fr);
  gap: 28px;
  align-items: start;
  padding-inline: 18px 0;
}

.atlas-copy {
  position: relative;
  z-index: 2;
  padding-top: 46px;
  margin-left: 34px;
  max-width: 390px;
}

.atlas-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.atlas-chip {
  border: 1px solid rgba(17, 168, 242, 0.3);
  background: rgba(255, 255, 255, 0.9);
  color: #3f5870;
  border-radius: 999px;
  padding: 9px 16px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(17, 168, 242, 0.08);
}

.atlas-chip-active {
  background: linear-gradient(135deg, #22b1f7, #0f97dd);
  color: #ffffff;
  border-color: transparent;
}

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

.atlas-card {
  display: block;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border: 1.5px solid rgba(17, 168, 242, 0.45);
  border-radius: 14px;
  box-shadow: 0 10px 20px rgba(17, 168, 242, 0.08);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.atlas-card:hover {
  transform: translateY(-2px);
  border-color: rgba(17, 168, 242, 0.85);
  box-shadow: 0 16px 28px rgba(17, 168, 242, 0.14);
}

.atlas-card-active {
  border-color: #11a8f2;
  box-shadow: 0 16px 28px rgba(17, 168, 242, 0.16);
}

.atlas-card h3 {
  margin: 0 0 6px;
  color: #149de3;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.atlas-card p {
  margin: 0;
  color: #61707e;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
}

.atlas-visual {
  position: relative;
  min-height: 720px;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}

.atlas-visual-detail {
  min-height: 860px;
  padding-bottom: 190px;
}

.atlas-detail-card {
  position: absolute;
  top: 150px;
  left: 6px;
  z-index: 3;
  width: min(100%, 330px);
  padding: 20px 18px 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid rgba(17, 168, 242, 0.38);
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(17, 168, 242, 0.14);
}

.atlas-detail-card h2 {
  margin: 0 0 10px;
  color: #11a8f2;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.08;
  text-transform: uppercase;
}

.atlas-detail-card p {
  margin: 0;
  color: #2f3d4d;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  text-transform: uppercase;
}

.atlas-frame {
  position: absolute;
  inset: 8px 10px 0 0;
  border: 3px solid #19a6ec;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(179, 228, 250, 0.18), rgba(255, 255, 255, 0.02));
  z-index: 0;
  pointer-events: none;
}

.atlas-glow {
  position: absolute;
  inset: 120px 40px 60px 40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(24, 167, 238, 0.14), transparent 65%);
  filter: blur(24px);
  z-index: 0;
  pointer-events: none;
}

.atlas-model {
  position: relative;
  z-index: 2;
  width: min(100%, 760px);
  min-height: 720px;
  padding: 22px 8px 12px;
  transform: translateX(-18px) scale(1);
  transform-origin: center center;
}

.atlas-model iframe {
  width: 100%;
  height: 100%;
  min-height: 680px;
  border: 0;
  background: transparent;
}

.atlas-parts {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 8px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.atlas-part {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 76px;
  padding: 12px 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, #1cb2f6 0%, #0b9ce6 100%);
  box-shadow: 0 14px 28px rgba(17, 168, 242, 0.22);
  color: #ffffff;
  text-decoration: none;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.page-atlas .footer-grid {
  margin-top: -34px;
}

@media (max-width: 1180px) {
  .atlas-shell {
    grid-template-columns: 1fr;
    padding-inline: 0;
  }

  .atlas-copy {
    padding-top: 10px;
    margin-left: 0;
    max-width: 100%;
  }

  .atlas-visual {
    min-height: 620px;
  }

  .atlas-visual-detail {
    min-height: 860px;
  }

  .atlas-model {
    min-height: 620px;
  }

  .atlas-model iframe {
    min-height: 580px;
  }

  .atlas-parts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 760px) {
  .atlas-main {
    padding-top: 18px;
  }

  .atlas-hero {
    padding-bottom: 36px;
  }

  .atlas-switch {
    margin-bottom: 14px;
  }

  .atlas-chip {
    width: 100%;
    text-align: center;
  }

  .atlas-card {
    padding: 12px;
  }

  .atlas-card h3 {
    font-size: 14px;
  }

  .atlas-card p {
    font-size: 10px;
  }

  .atlas-visual {
    min-height: 420px;
    justify-content: center;
  }

  .atlas-visual-detail {
    min-height: auto;
    padding-bottom: 0;
  }

  .atlas-detail-card {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    margin-bottom: 18px;
  }

  .atlas-frame {
    inset: 4px 0 0;
  }

  .atlas-glow {
    inset: 80px 12px 24px;
  }

  .atlas-model {
    min-height: 420px;
    padding: 18px 0 6px;
    transform: none;
  }

  .atlas-model iframe {
    min-height: 390px;
  }

  .atlas-parts {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
    padding: 0;
  }

  .page-atlas .footer-grid {
    margin-top: 0;
  }
}

.atlas-focus-page {
  padding: 18px 0 34px;
}

.atlas-focus-shell {
  max-width: 980px;
}

.atlas-focus-visual {
  position: relative;
  min-height: 920px;
  padding: 24px 26px 180px;
}

.atlas-focus-frame {
  inset: 0 12px 132px 12px;
  border-width: 3px;
  border-radius: 16px;
}

.atlas-focus-ring {
  position: absolute;
  top: 12px;
  left: 100px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 12px solid rgba(255, 255, 255, 0.72);
  border-right-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(-18deg);
  pointer-events: none;
  z-index: 1;
}

.atlas-focus-card {
  position: absolute;
  top: 236px;
  left: 0;
  z-index: 3;
  width: min(100%, 330px);
  padding: 18px 18px 14px;
  background: rgba(255, 255, 255, 0.97);
  border: 2px solid rgba(17, 168, 242, 0.42);
  border-radius: 18px;
  box-shadow: 0 18px 36px rgba(17, 168, 242, 0.14);
}

.atlas-focus-card h1 {
  margin: 0 0 12px;
  color: #11a8f2;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.08;
  text-transform: uppercase;
}

.atlas-focus-card p {
  margin: 0;
  color: #2f3d4d;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.38;
  text-transform: uppercase;
}

.atlas-focus-model {
  width: min(100%, 720px);
  min-height: 760px;
  margin: 0 auto;
  transform: translateX(18px) scale(1.05);
}

.atlas-focus-model iframe {
  min-height: 740px;
}

.atlas-focus-parts {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 16px;
}

.atlas-focus-part {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 78px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  background: linear-gradient(180deg, #1cb2f6 0%, #0a9ae5 100%);
  box-shadow: 0 14px 28px rgba(17, 168, 242, 0.22);
  color: #ffffff;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.atlas-focus-icon {
  display: block;
  margin-top: 6px;
  font-size: 25px;
  line-height: 1;
  opacity: 0.85;
}

/* AI ASSISTANT */
.page-ai {
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.92), transparent 28%),
    linear-gradient(180deg, #dff3fc 0%, #eef8fd 58%, #d4eef9 100%);
}

.ai-main {
  min-height: calc(100vh - 78px);
}

.ai-hero {
  padding: 70px 0 80px;
}

.ai-shell {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(420px, 1fr);
  gap: 34px;
  align-items: start;
}

.ai-intro-card {
  padding: 24px 22px;
  border: 2px solid rgba(17, 168, 242, 0.34);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(17, 168, 242, 0.14);
}

.ai-kicker,
.ai-panel-label {
  display: inline-flex;
  margin-bottom: 10px;
  color: #0f97dd;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-intro-card h1 {
  margin: 0 0 14px;
  color: #142f45;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
}

.ai-intro-card p {
  margin: 0;
  color: #506575;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
}

.ai-steps {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.ai-step {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1.5px solid rgba(17, 168, 242, 0.3);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 22px rgba(17, 168, 242, 0.08);
}

.ai-step>span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(17, 168, 242, 0.12);
  color: #0f97dd;
  font-weight: 800;
}

.ai-step h3 {
  margin: 0 0 4px;
  color: #17384f;
  font-size: 14px;
  font-weight: 800;
}

.ai-step p {
  margin: 0;
  color: #61707e;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.ai-workspace {
  position: relative;
  /* display: grid; */
  grid-template-columns: minmax(260px, 0.8fr) minmax(330px, 1.2fr);
  gap: 18px;
  /* min-height: 720px; */
  padding: 30px;
}

.ai-workspace .atlas-frame {
  inset: 0;
}

.ai-workspace .atlas-glow {
  inset: 90px 80px 80px;
}

.ai-panel {
  position: relative;
  z-index: 2;
  align-self: start;
  padding: 22px;
  border: 2px solid rgba(17, 168, 242, 0.34);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 38px rgba(17, 168, 242, 0.14);
}

.ai-chat-panel {
  /* min-height: 620px; */
}

.ai-panel h2 {
  margin: 0 0 16px;
  color: #142f45;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
}

.ai-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ai-badge {
  flex-shrink: 0;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(17, 168, 242, 0.1);
  color: #0f97dd;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.ai-file-drop {
  display: grid;
  place-items: center;
  /* min-height: 210px; */
  padding: 7px;
  border: 2px dashed rgba(17, 168, 242, 0.45);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(229, 246, 253, 0.82), rgba(255, 255, 255, 0.9));
  color: #17384f;
  text-align: center;
  cursor: pointer;
}

.ai-file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ai-file-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  /* margin-bottom: 12px; */
  border-radius: 14px;
  background: linear-gradient(135deg, #22b1f7, #0f97dd);
  color: #ffffff;
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.ai-file-drop strong {
  width: 100%;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.ai-file-drop small {
  max-width: 240px;
  margin-top: 8px;
  color: #61707e;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.ai-action {
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #22b1f7, #0f97dd);
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(17, 168, 242, 0.22);
}

.ai-action:disabled {
  cursor: wait;
  opacity: 0.7;
}

.ai-status {
  min-height: 40px;
  margin: 12px 0 0;
  color: #506575;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.ai-chat-panel textarea {
  width: 100%;
  resize: vertical;
  padding: 14px;
  border: 1.5px solid rgba(17, 168, 242, 0.34);
  border-radius: 14px;
  outline: none;
  color: #17384f;
  background: #f8fbfd;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.ai-chat-panel textarea:focus {
  border-color: #11a8f2;
  box-shadow: 0 0 0 4px rgba(17, 168, 242, 0.12);
}

.ai-answer {
  min-height: 150px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  background: #f2f8fc;
  color: #24394a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  white-space: pre-wrap;
}

.ai-answer span {
  color: #6a7b88;
}

.ai-sources {
  margin-top: 14px;
}

.ai-sources h3 {
  margin: 0 0 10px;
  color: #0f97dd;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.ai-source {
  margin-top: 10px;
  padding: 12px;
  border-left: 4px solid #11a8f2;
  border-radius: 10px;
  background: #f8fbfd;
  color: #4c6170;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: pre-wrap;
}

@media (max-width: 1120px) {

  .ai-shell,
  .ai-workspace {
    grid-template-columns: 1fr;
  }

  .ai-copy {
    padding-top: 10px;
  }

  .ai-workspace {
    min-height: 0;
  }

  .ai-chat-panel {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .ai-hero {
    padding: 50px 0 48px;
  }

  .ai-intro-card h1 {
    font-size: 27px;
  }

  .ai-workspace {
    padding: 16px;
  }

  .ai-panel {
    padding: 18px;
  }

  .ai-panel h2 {
    font-size: 21px;
  }

  .ai-chat-head {
    display: block;
  }

  .ai-badge {
    display: inline-flex;
    margin-bottom: 12px;
  }
}

@media (max-width: 1180px) {
  .atlas-focus-visual {
    min-height: 860px;
  }

  .atlas-focus-model {
    min-height: 700px;
    transform: translateX(0) scale(1);
  }

  .atlas-focus-model iframe {
    min-height: 680px;
  }
}

@media (max-width: 760px) {
  .atlas-focus-visual {
    min-height: auto;
    padding: 12px 0 0;
  }

  .atlas-focus-frame {
    inset: 0 0 0;
  }

  .atlas-focus-ring {
    top: 18px;
    left: 50%;
    width: 280px;
    height: 280px;
    transform: translateX(-50%) rotate(-18deg);
    border-width: 8px;
  }

  .atlas-focus-card {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    margin: 0 0 16px;
  }

  .atlas-focus-model {
    width: 100%;
    min-height: 420px;
    margin: 0;
    transform: none;
  }

  .atlas-focus-model iframe {
    min-height: 420px;
  }

  .atlas-focus-parts {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
  }
}

.skull-page {
  padding-bottom: 24px;
}

.skull-shell {
  max-width: 980px;
}

.skull-stage {
  position: relative;
  min-height: 1000px;
  padding: 22px 22px 40px;
}

.skull-stage-frame {
  inset: 0 10px 0 10px;
  border-radius: 14px;
}

.skull-stage-ring {
  top: 8px;
  left: 92px;
  width: 520px;
  height: 520px;
}

.skull-intro-card {
  position: absolute;
  top: 122px;
  left: 0;
  z-index: 3;
  width: min(100%, 330px);
  padding: 18px 18px 14px;
  background: rgba(255, 255, 255, 0.97);
  border: 2px solid rgba(17, 168, 242, 0.42);
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(17, 168, 242, 0.14);
}

.skull-intro-card h1 {
  margin: 0 0 10px;
  color: #12a5eb;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.08;
  text-transform: uppercase;
}

.skull-intro-card p {
  margin: 0;
  color: #34485c;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.45;
  text-transform: uppercase;
}

.skull-stage-model {
  width: min(100%, 620px);
  min-height: 420px;
  margin: 0 auto;
  transform: translateX(70px) scale(1);
}

.skull-stage-model iframe {
  min-height: 420px;
}

.skull-article {
  position: relative;
  z-index: 3;
  width: min(100%, 760px);
  margin: -40px auto 0;
}

.skull-text-card {
  padding: 22px 24px;
  background: rgba(255, 255, 255, 0.97);
  border: 2px solid rgba(17, 168, 242, 0.36);
  border-radius: 12px;
  box-shadow: 0 16px 32px rgba(17, 168, 242, 0.12);
}

.skull-text-card h2 {
  margin: 0 0 8px;
  color: #20384d;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-transform: uppercase;
}

.skull-text-card p {
  margin: 0 0 16px;
  color: #3b5368;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.55;
  text-transform: uppercase;
}

.skull-text-card p:last-child {
  margin-bottom: 0;
}

.skull-gallery {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.skull-figure {
  margin: 0;
  padding: 16px;
  background: rgba(255, 255, 255, 0.97);
  border: 2px solid rgba(17, 168, 242, 0.22);
  border-radius: 12px;
  box-shadow: 0 12px 26px rgba(17, 168, 242, 0.08);
}

.skull-figure img {
  width: 100%;
  border-radius: 8px;
  background: #ffffff;
}

.skull-figure figcaption {
  margin-top: 10px;
  color: #2a4a63;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

@media (max-width: 1180px) {
  .skull-stage-model {
    transform: translateX(24px);
  }
}

@media (max-width: 760px) {
  .skull-stage {
    min-height: auto;
    padding: 12px 0 0;
  }

  .skull-stage-frame {
    inset: 0;
  }

  .skull-stage-ring {
    top: 14px;
    left: 50%;
    width: 280px;
    height: 280px;
    transform: translateX(-50%) rotate(-18deg);
    border-width: 8px;
  }

  .skull-intro-card {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    margin-bottom: 12px;
  }

  .skull-stage-model {
    width: 100%;
    min-height: 360px;
    margin: 0;
    transform: none;
  }

  .skull-stage-model iframe {
    min-height: 360px;
  }

  .skull-article {
    width: 100%;
    margin-top: 10px;
  }

  .skull-text-card {
    padding: 16px;
  }

  .skull-text-card h2 {
    font-size: 12px;
  }

  .skull-text-card p {
    font-size: 10px;
  }

  .skull-gallery {
    gap: 12px;
  }

  .skull-figure {
    padding: 10px;
  }
}

.premium-models {
  padding: 14px 0 54px;
}

.premium-shell {
  display: grid;
  gap: 28px;
}

.premium-head {
  padding: 26px 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 168, 242, 0.16);
  border-radius: 28px;
  box-shadow: 0 20px 36px rgba(17, 168, 242, 0.08);
}

.premium-kicker {
  margin: 0 0 8px;
  color: #11a8f2;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.premium-head h2 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
  color: #16344d;
}

.premium-head p {
  margin: 0;
  max-width: 900px;
  color: #5d7487;
  line-height: 1.6;
}

.premium-group {
  display: grid;
  gap: 14px;
}

.premium-group h3 {
  margin: 0;
  padding-left: 8px;
  font-size: clamp(22px, 2.5vw, 32px);
  color: #149de3;
}

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

.premium-grid-single {
  grid-template-columns: 1fr;
}

.premium-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(17, 168, 242, 0.16);
  border-radius: 26px;
  box-shadow: 0 18px 34px rgba(17, 168, 242, 0.08);
}

.premium-card-feature {
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  align-items: start;
}

.premium-card-copy {
  display: grid;
  gap: 8px;
}

.premium-tag {
  margin: 0;
  color: #11a8f2;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.premium-card h4 {
  margin: 0;
  color: #16344d;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.15;
}

.premium-card p {
  margin: 0;
  color: #667e92;
  line-height: 1.55;
}

.premium-frame {
  overflow: hidden;
  min-height: 420px;
  border-radius: 22px;
  border: 2px solid rgba(17, 168, 242, 0.18);
  background:
    radial-gradient(circle at top, rgba(17, 168, 242, 0.08), transparent 42%),
    #f9fdff;
}

.premium-card-feature .premium-frame {
  min-height: 720px;
}

@media (max-width: 1180px) {
  .premium-grid {
    grid-template-columns: 1fr;
  }

  .premium-card-feature {
    grid-template-columns: 1fr;
  }

  .premium-card-feature .premium-frame {
    min-height: 560px;
  }
}

@media (max-width: 760px) {
  .premium-models {
    padding-top: 6px;
  }

  .premium-head {
    padding: 18px;
    border-radius: 22px;
  }

  .premium-group h3 {
    padding-left: 0;
    font-size: 22px;
  }

  .premium-card {
    padding: 14px;
    border-radius: 20px;
  }

  .premium-frame {
    min-height: 300px;
    border-radius: 18px;
  }

  .premium-card-feature .premium-frame {
    min-height: 360px;
  }
}

/* BOOK CATALOG */

.page-books {
  background:
    radial-gradient(circle at 10% 0%, rgba(17, 168, 242, 0.14), transparent 30%),
    linear-gradient(180deg, #fbfdff 0%, #f4f8fb 100%);
}

.books-page {
  padding-bottom: 80px;
  padding-top: 80px;
}

.books-hero {
  padding: 34px 0 18px;
}

.books-hero-inner,
.book-reader {
  /* border: 1px solid rgba(17, 168, 242, 0.16); */
  /* border-radius: 28px; */
  /* background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78)),
    radial-gradient(circle at 85% 20%, rgba(17, 168, 242, 0.16), transparent 34%); */
  /* box-shadow: 0 24px 70px rgba(16, 40, 61, 0.09); */
}

.books-hero-inner {
  padding-left: 10px;
}

.books-hero h1 {
  margin: 0 0 22px;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: clamp(54px, 7vw, 96px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: #007fc2;
}

.book-search {
  display: grid;
  gap: 8px;
  width: 99%;
}

.book-search span {
  color: #007fc2;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-left: 5px;
}

.book-search input {
  width: 100%;
  min-height: 58px;
  padding: 0 20px;
  border: 1px solid rgba(17, 168, 242, 0.24);
  border-radius: 16px;
  outline: 0;
  background: #fff;
  color: #10283d;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 14px 34px rgba(16, 40, 61, 0.08);
}

.book-search input:focus {
  border-color: #11a8f2;
  box-shadow: 0 0 0 4px rgba(17, 168, 242, 0.12);
}

.books-section {
  padding-top: 5px;
}

.book-upload-section {
  padding: 0 0 18px;
}

.book-upload {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(17, 168, 242, 0.16);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 58px rgba(16, 40, 61, 0.08);
}

.book-upload-head {
  margin-bottom: 16px;
}

.book-upload-head p {
  margin: 0 0 6px;
  color: #007fc2;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.book-upload-head h2 {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1.08;
}

.book-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.book-upload-grid label {
  display: grid;
  gap: 7px;
}

.book-upload-grid label.wide {
  grid-column: 1 / -1;
}

.book-upload-grid label span {
  color: #38566c;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-upload-grid input,
.book-upload-grid textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(17, 168, 242, 0.22);
  border-radius: 14px;
  outline: 0;
  background: #fff;
  color: #10283d;
  font: inherit;
  font-weight: 650;
}

.book-upload-grid textarea {
  resize: vertical;
}

.book-upload-grid input:focus,
.book-upload-grid textarea:focus {
  border-color: #11a8f2;
  box-shadow: 0 0 0 4px rgba(17, 168, 242, 0.1);
}

.book-upload-submit {
  min-height: 48px;
  margin-top: 16px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #11a8f2, #007fc2);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.upload-message {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(17, 168, 242, 0.24);
  border-radius: 14px;
  background: rgba(17, 168, 242, 0.08);
  color: #007fc2;
  font-weight: 800;
}

.upload-message-error {
  border-color: rgba(219, 67, 67, 0.28);
  background: rgba(219, 67, 67, 0.08);
  color: #a72f2f;
}

.books-layout {
  display: grid;
  gap: 22px;
}

.specialty-filter-section {
  padding: 0 0 0px;
  display: flex;
  justify-content: center;
}

.specialty-filter-section>div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.specialty-filter-toggle {
  width: 98%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(17, 168, 242, 0.24);
  border-radius: 10px;
  background: #fff;
  color: #007fc2;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  text-align: left;
}

.specialty-filter-toggle::after {
  content: "v";
  float: right;
  color: #38566c;
}

.specialty-filter-toggle[aria-expanded="true"]::after {
  content: "^";
}

.specialty-filter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
  padding: 12px;
  width: 98%;
  border: 1px solid rgba(17, 168, 242, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.specialty-filter[hidden] {
  display: none;
}

.specialty-filter-card {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 14px;
  border: 1px solid rgba(17, 168, 242, 0.18);
  border-radius: 8px;
  background: #fff;
  color: #10283d;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(16, 40, 61, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.specialty-filter-card:hover {
  border-color: rgba(17, 168, 242, 0.36);
  background: rgba(255, 255, 255, 0.94);
}

.specialty-filter-card.active {
  border-color: rgba(0, 127, 194, 0.55);
  background: rgba(238, 248, 255, 0.9);
}

.specialty-filter-card strong {
  font-size: 16px;
  line-height: 1.2;
}

.specialty-filter-card span {
  color: #6f8497;
  font-size: 12px;
  line-height: 1.45;
}

.specialty-filter-close {
  grid-column: 1 / -1;
  min-height: 44px;
  border: 1px solid rgba(17, 168, 242, 0.22);
  border-radius: 10px;
  background: #eef8ff;
  color: #007fc2;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.books-list {
  display: flex;
  gap: 18px;
  flex-direction: column;
  padding: 10px;
}

.book-open {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  min-height: 160px;
  padding: 16px;
  border: 1px solid rgba(17, 168, 242, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  color: #10283d;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 18px 48px rgba(16, 40, 61, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.book-open:hover {
  transform: translateY(-3px);
  border-color: rgba(17, 168, 242, 0.36);
  box-shadow: 0 26px 62px rgba(16, 40, 61, 0.12);
}

.book-cover {
  display: block;
  width: 100%;
  min-height: 70px;
  overflow: hidden;
  border-radius: 18px;
}

.book-cover img {
  width: 100%;
  height: 100%;
  min-height: 100px;
  object-fit: contain;
}

.book-number {
  color: #007fc2;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.book-card-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.book-card-copy strong {
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.08;
}

.book-card-copy em {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(17, 168, 242, 0.1);
  color: #007fc2;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.book-card-copy span {
  color: #007fc2;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-card-copy small {
  color: #6f8497;
  font-size: 14px;
  line-height: 1.55;
}

.book-reader {
  padding: clamp(18px, 3vw, 28px);
}

.book-reader-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.book-reader-head p {
  margin: 0 0 6px;
  color: #007fc2;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.book-reader-head h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.05;
}

.book-reader-head span {
  color: #6f8497;
  font-weight: 700;
}

.reader-close {
  position: sticky;
  top: 86px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #eef8ff;
  color: #007fc2;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.book-reader-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.book-reader-actions button {
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid rgba(17, 168, 242, 0.28);
  border-radius: 8px;
  background: #ffffff;
  color: #007fc2;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.book-reader-actions button.active,
.book-reader-actions button:hover {
  background: #11a8f2;
  color: #ffffff;
}

.reader-pages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.reader-page {
  min-height: 360px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(16, 40, 61, 0.08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(16, 40, 61, 0.08);
}

.reader-page span {
  color: #007fc2;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.reader-page h3 {
  margin: 18px 0 14px;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.18;
}

.reader-page p {
  margin: 0;
  color: #38566c;
  font-size: 17px;
  line-height: 1.8;
}

.reader-page-image {
  display: block;
  width: 100%;
  max-height: 260px;
  margin: 18px 0 0;
  border-radius: 8px;
  object-fit: cover;
}

.reader-intro,
.reader-empty-panel {
  grid-column: 1 / -1;
}

.reader-test-question,
.reader-case {
  min-height: auto;
}

.reader-test-question label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0;
  color: #38566c;
  font-weight: 700;
  line-height: 1.45;
}

.reader-test-question input {
  margin-top: 4px;
}

.reader-answer {
  margin-top: 14px !important;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 900;
}

.reader-answer.correct {
  background: rgba(42, 173, 95, 0.12);
  color: #168046;
}

.reader-answer.wrong {
  background: rgba(228, 84, 84, 0.12);
  color: #bd3030;
}

.reader-case details {
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  background: #f4f9fd;
}

.reader-case summary {
  color: #007fc2;
  cursor: pointer;
  font-weight: 900;
}

.reader-download,
.empty-search {
  margin-top: 18px;
  padding: 18px;
  border: 1px dashed rgba(17, 168, 242, 0.34);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  color: #6f8497;
  font-weight: 700;
}

.reader-download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.reader-controls {
  justify-content: center;
  flex-wrap: wrap;
}

.reader-controls p {
  display: none;
}

.reader-download p {
  margin: 0;
}

.reader-page-arrow {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: #eef8ff;
  color: #007fc2;
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 900;
}

.reader-page-arrow:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.reader-page-count {
  min-width: 88px;
  text-align: center;
  color: #10283d;
  font-size: 18px;
  font-weight: 900;
}

.download-pdf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #11a8f2, #007fc2);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

@media (max-width: 860px) {

  .books-list,
  .reader-pages,
  .specialty-filter,
  .book-upload-grid {
    grid-template-columns: 1fr;
  }

  .books-list {
    display: flex;
    gap: 18px;
    flex-direction: column;
    padding: 5px;
  }

  .reader-download {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .books-page {
    padding-bottom: 34px;
  }

  .books-hero {
    padding: 18px 0 12px;
  }

  .books-hero-inner,
  .book-reader {
    /* border-radius: 12px; */
    /* box-shadow: 0 12px 30px rgba(16, 40, 61, 0.07); */
  }

  .books-hero-inner {
    padding-left: 5px;
  }

  .books-hero h1 {
    margin-bottom: 14px;
    font-size: 48px;
    color: #007fc1;
  }

  .book-search input {
    min-height: 48px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 14px;
  }

  .specialty-filter-section {
    /* padding-bottom: 12px; */
  }

  .specialty-filter-card {
    min-height: auto;
    padding: 12px;
  }

  .specialty-filter-card strong {
    font-size: 15px;
  }

  .specialty-filter-card span {
    font-size: 12px;
  }

  .book-open {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    min-height: 128px;
    padding: 12px;
    border-radius: 12px;
  }

  .book-cover {
    border-radius: 10px;
    aspect-ratio: 3 / 4;
  }

  .book-cover img {
    min-height: 104px;
    object-fit: contain;
    background: #eef8ff;
  }

  .book-card-copy {
    gap: 6px;
  }

  .book-card-copy strong {
    font-size: 20px;
    line-height: 1.15;
  }

  .book-card-copy span,
  .book-card-copy small {
    font-size: 12px;
    line-height: 1.35;
  }

  .book-card-copy em {
    padding: 4px 7px;
    font-size: 11px;
  }

  .book-reader {
    padding: 14px;
  }

  .book-reader-head {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
  }

  .book-reader-head h2 {
    font-size: 26px;
  }

  .reader-close {
    top: 70px;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }

  .reader-page {
    min-height: auto;
    padding: 16px;
    border-radius: 10px;
  }

  .lang-switch {
    grid-column: 1 / -1;
    justify-content: center;
    width: 100%;
  }

  .reader-page h3 {
    margin: 12px 0 10px;
    font-size: 21px;
  }

  .reader-page p {
    font-size: 15px;
    line-height: 1.65;
  }

  .reader-page-image {
    max-height: 210px;
    border-radius: 8px;
  }

  .reader-controls {
    display: grid;
    grid-template-columns: 46px 1fr 46px;
    gap: 10px;
  }

  .reader-controls .download-pdf {
    grid-column: 1 / -1;
    width: 100%;
  }

  .book-cover img {
    width: 100%;
    height: 100%;
    max-height: none;
  }
}

@media (max-width: 380px) {
  .container {
    width: min(100% - 18px, 1180px);
  }

  .brand span {
    font-size: 15px;
  }

  .book-open {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
  }

  .book-cover img {
    min-height: 128px;
  }

  .book-card-copy strong {
    font-size: 18px;
  }

  .reader-page {
    padding: 14px;
  }

  .reader-page p {
    font-size: 14px;
  }
}

/* ADMIN */

.page-admin {
  background:
    radial-gradient(circle at 10% 0%, rgba(17, 168, 242, 0.14), transparent 30%),
    linear-gradient(180deg, #fbfdff 0%, #f4f8fb 100%);
}

.online-text-page {
  padding-bottom: 64px;
}

.online-text-hero {
  padding: 34px 0 18px;
}

.online-text-hero-inner,
.online-text-sidebar,
.online-text-card,
.online-text-empty {
  border: 1px solid rgba(17, 168, 242, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78)),
    radial-gradient(circle at 85% 20%, rgba(17, 168, 242, 0.16), transparent 34%);
  box-shadow: 0 24px 70px rgba(16, 40, 61, 0.09);
}

.online-text-hero-inner {
  padding: clamp(24px, 4vw, 44px);
}

.online-text-hero h1 {
  margin: 0 0 14px;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: clamp(54px, 7vw, 96px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: #10283d;
}

.online-text-hero p {
  margin: 0;
  max-width: 720px;
  color: #38566c;
  font-weight: 750;
  line-height: 1.55;
}

.online-text-section {
  padding: 18px 0 0;
}

.online-text-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.online-text-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.online-text-search {
  display: grid;
  gap: 8px;
}

.online-text-search span,
.online-text-nav span,
.online-text-card header span {
  color: #007fc2;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.online-text-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(17, 168, 242, 0.22);
  border-radius: 14px;
  outline: 0;
  background: #fff;
  color: #10283d;
  font: inherit;
  font-weight: 700;
}

.online-text-nav {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 230px);
  overflow: auto;
  padding-right: 4px;
}

.online-text-nav a {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(17, 168, 242, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.online-text-nav strong {
  color: #10283d;
  font-size: 14px;
  line-height: 1.25;
}

.online-text-content {
  display: grid;
  gap: 18px;
}

.online-text-card {
  scroll-margin-top: 100px;
  display: grid;
  gap: 18px;
  padding: clamp(20px, 3vw, 34px);
}

.online-text-card header {
  display: grid;
  gap: 8px;
}

.online-text-card h2 {
  margin: 0;
  color: #10283d;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.1;
}

.online-text-body {
  color: #2f4254;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.78;
  overflow-wrap: anywhere;
  white-space: normal;
}

.online-text-empty {
  padding: 22px;
  color: #6f8497;
  font-weight: 800;
}

.online-test-page {
  padding-bottom: 64px;
}

.online-test-hero {
  padding: 34px 0 18px;
}

.online-test-hero-inner,
.online-test-sidebar,
.online-test-exam {
  border: 1px solid rgba(17, 168, 242, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78)),
    radial-gradient(circle at 85% 20%, rgba(17, 168, 242, 0.16), transparent 34%);
  box-shadow: 0 24px 70px rgba(16, 40, 61, 0.09);
}

.online-test-hero-inner {
  padding: clamp(24px, 4vw, 44px);
}

.online-test-hero h1 {
  margin: 0 0 14px;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: clamp(54px, 7vw, 96px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: #10283d;
}

.online-test-hero p {
  margin: 0;
  max-width: 720px;
  color: #38566c;
  font-weight: 750;
  line-height: 1.55;
}

.online-test-section {
  padding: 18px 0 0;
}

.online-test-layout {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.online-test-sidebar,
.online-test-exam {
  padding: clamp(16px, 3vw, 26px);
}

.online-test-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
}

.online-test-search {
  display: grid;
  gap: 8px;
}

.online-test-search span,
.online-test-card span,
.online-test-head span,
.online-test-score span {
  color: #007fc2;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.online-test-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(17, 168, 242, 0.22);
  border-radius: 14px;
  outline: 0;
  background: #fff;
  color: #10283d;
  font: inherit;
  font-weight: 700;
}

.online-test-list,
.online-test-questions,
.online-test-exam,
.online-test-head {
  display: grid;
  gap: 14px;
}

.online-test-card {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(17, 168, 242, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: #10283d;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.online-test-card.active,
.online-test-card:hover {
  border-color: rgba(17, 168, 242, 0.36);
  box-shadow: 0 12px 28px rgba(17, 168, 242, 0.12);
}

.online-test-card strong {
  color: #10283d;
  font-size: 18px;
  line-height: 1.18;
}

.online-test-card small {
  color: #6f8497;
  font-size: 13px;
  font-weight: 800;
}

.online-test-head h2 {
  margin: 0;
  color: #10283d;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.1;
}

.online-test-head p {
  margin: 0;
  color: #6f8497;
  font-weight: 700;
  line-height: 1.55;
}

.online-test-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #eef8ff;
}

.online-test-score strong {
  color: #0a86c4;
  font-size: 22px;
}

.online-question {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(17, 168, 242, 0.14);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(238, 248, 255, 0.72), rgba(255, 255, 255, 0.94));
}

.online-question h3 {
  margin: 0;
  color: #284b63;
  font-size: 20px;
  line-height: 1.3;
}

.online-options {
  display: grid;
  gap: 8px;
}

.online-options button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(17, 168, 242, 0.16);
  border-radius: 12px;
  background: #fff;
  color: #2f4254;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.online-options b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #eef8ff;
  color: #007fc2;
}

.online-options button.correct {
  border-color: rgba(38, 166, 91, 0.36);
  background: rgba(38, 166, 91, 0.1);
}

.online-options button.wrong {
  border-color: rgba(219, 67, 67, 0.36);
  background: rgba(219, 67, 67, 0.08);
}

.online-answer,
.online-test-result,
.online-test-empty {
  margin: 0;
  color: #38566c;
  font-weight: 900;
}

.online-test-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.online-test-reset {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #11a8f2, #007fc2);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-page {
  padding-bottom: 80px;
  padding-top: 80px;
}

.admin-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 2px;
}

.admin-actions,
.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: fit-content;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #11a8f2, #007fc2);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.admin-link-button.secondary {
  background: #eef8ff;
  color: #007fc2;
}

.admin-online-text-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.admin-online-text-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-online-test-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.admin-online-test-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-test-list,
.admin-test-card,
.admin-test-questions,
.admin-test-question-row {
  display: grid;
  gap: 10px;
}

.admin-test-card {
  padding: 14px;
  border: 1px solid rgba(17, 168, 242, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.admin-test-card header {
  display: grid;
  gap: 4px;
}

.admin-test-card h3 {
  margin: 0;
  color: #10283d;
  font-size: 20px;
}

.admin-test-card span,
.admin-test-card small,
.admin-test-question-row span {
  color: #6f8497;
  font-size: 13px;
  font-weight: 800;
}

.admin-test-question-row {
  padding: 12px;
  border: 1px solid rgba(17, 168, 242, 0.12);
  border-radius: 12px;
  background: #fff;
}

.admin-test-question-row strong {
  color: #284b63;
  line-height: 1.35;
}

.admin-large-textarea {
  min-height: 520px;
  line-height: 1.6;
}

.admin-hero,
.admin-section {
  padding: 26px 0 0;
}

.admin-hero-inner,
.admin-panel {
  border: 1px solid rgba(17, 168, 242, 0.16);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 58px rgba(16, 40, 61, 0.08);
}

.admin-hero-inner {
  padding: clamp(22px, 4vw, 40px);
}

.admin-hero h1 {
  margin: 0 0 10px;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: clamp(52px, 7vw, 92px);
  font-weight: 900;
  line-height: 0.92;
}

.admin-hero p {
  margin: 0 0 16px;
  color: #6f8497;
  font-weight: 700;
}

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

.admin-workspace {
  padding-top: 18px;
}

.admin-workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: start;
}

.admin-workspace-main {
  min-width: 0;
  order: 1;
}

.admin-side-nav {
  position: sticky;
  top: 92px;
  order: 2;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(17, 168, 242, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 42px rgba(16, 40, 61, 0.08);
}

.admin-side-nav button,
.admin-side-nav a {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(17, 168, 242, 0.16);
  border-radius: 8px;
  background: #ffffff;
  color: #38566c;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  text-align: left;
}

.admin-side-nav button.active,
.admin-side-nav button:hover,
.admin-side-nav a:hover {
  border-color: #11a8f2;
  background: #eef8ff;
  color: #007fc2;
}

.admin-section-nested {
  padding-top: 0;
}

.admin-section-nested>.container {
  width: 100%;
  max-width: none;
  padding: 0;
}

.admin-section-nested .admin-grid {
  grid-template-columns: 1fr;
}

.admin-page [hidden] {
  display: none !important;
}

.admin-panel {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 3vw, 26px);
}

.admin-panel h2 {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.1;
}

.admin-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-section-head p {
  margin: 6px 0 0;
  color: #6f8497;
  font-size: 13px;
  font-weight: 800;
}

.admin-panel label {
  display: grid;
  gap: 7px;
}

.admin-panel label span {
  color: #38566c;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-panel input,
.admin-panel select,
.admin-panel textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid rgba(17, 168, 242, 0.22);
  border-radius: 14px;
  outline: 0;
  background: #fff;
  color: #10283d;
  font: inherit;
  font-weight: 650;
}

.admin-panel textarea {
  resize: vertical;
}

.admin-panel label.wide,
.admin-panel .wide,
.book-editor-actions,
.book-page-editor {
  grid-column: 1 / -1;
}

.book-editor-actions {
  display: grid;
  grid-template-columns: minmax(150px, 220px) auto auto;
  align-items: end;
  gap: 10px;
}

.book-page-editor {
  display: grid;
  gap: 12px;
}

.book-page-field {
  padding: 14px;
  border: 1px solid rgba(17, 168, 242, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.admin-panel input:focus,
.admin-panel select:focus,
.admin-panel textarea:focus {
  border-color: #11a8f2;
  box-shadow: 0 0 0 4px rgba(17, 168, 242, 0.1);
}

.admin-panel button {
  width: fit-content;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #11a8f2, #007fc2);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.admin-model-list {
  display: grid;
  gap: 12px;
}

.admin-empty-note {
  margin: 0;
  color: #6f8497;
  font-weight: 700;
}

.admin-model-row {
  border: 1px solid rgba(17, 168, 242, 0.14);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.admin-model-summary {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.admin-model-summary::-webkit-details-marker {
  display: none;
}

.admin-model-thumb {
  width: 92px;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: #eef8ff;
}

.admin-model-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-model-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.admin-model-info strong {
  color: #10283d;
  font-size: 16px;
  line-height: 1.25;
}

.admin-model-info span,
.admin-model-info small {
  min-width: 0;
  overflow: hidden;
  color: #6f8497;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-model-info small {
  color: #8da0af;
  font-size: 12px;
}

.admin-model-summary-action {
  padding: 10px 14px;
  border-radius: 999px;
  background: #eef8ff;
  color: #007fc2;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-model-row[open] .admin-model-summary-action {
  background: #10283d;
  color: #fff;
}

.admin-model-editor {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.admin-model-editor>form:first-child {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(17, 168, 242, 0.12);
}

.admin-model-editor label {
  display: grid;
  gap: 6px;
}

.admin-model-editor label span {
  color: #38566c;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-model-editor .wide {
  grid-column: 1 / -1;
}

.admin-model-editor .admin-delete-form {
  justify-self: end;
}

.admin-model-editor .admin-delete-form button {
  background: #fff1f1;
  color: #c22b2b;
}

.admin-book-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(17, 168, 242, 0.14);
  border-radius: 16px;
  background: #fff;
}

.admin-book-row div {
  display: grid;
  gap: 4px;
}

.admin-book-row span {
  color: #6f8497;
  font-size: 13px;
  font-weight: 700;
}

.admin-book-row form {
  margin: 0;
}

.admin-edit-row {
  align-items: stretch;
  flex-direction: column;
}

.admin-edit-row>form:first-child {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-edit-row label {
  display: grid;
  gap: 6px;
}

.admin-edit-row label span {
  color: #38566c;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-edit-row label:last-of-type,
.admin-edit-row .book-upload-submit {
  grid-column: 1 / -1;
}

.admin-book-row button {
  background: #eef8ff;
  color: #007fc2;
}

@media (max-width: 900px) {
  .admin-workspace-layout {
    grid-template-columns: 1fr;
  }

  .admin-side-nav {
    position: static;
    order: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-workspace-main {
    order: 1;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .online-text-layout,
  .admin-online-text-layout,
  .admin-online-text-form,
  .online-test-layout,
  .admin-online-test-layout,
  .admin-online-test-form {
    grid-template-columns: 1fr;
  }

  .online-text-sidebar,
  .online-test-sidebar {
    position: static;
  }

  .online-text-nav {
    max-height: none;
  }

  .book-editor-actions {
    grid-template-columns: 1fr;
  }

  .admin-section-head,
  .admin-book-row {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-section-head .admin-link-button {
    width: fit-content;
  }

  .admin-model-summary {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .admin-model-thumb {
    width: 78px;
  }

  .admin-model-summary-action {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .admin-model-editor>form:first-child {
    grid-template-columns: 1fr;
  }

  .admin-edit-row>form:first-child {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .admin-side-nav {
    grid-template-columns: 1fr;
  }

  .admin-page {
    padding-bottom: 34px;
  }

  .admin-hero,
  .admin-section {
    padding-top: 16px;
  }

  .admin-hero-inner,
  .admin-panel {
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(16, 40, 61, 0.07);
  }

  .admin-hero-inner,
  .admin-panel {
    padding: 16px;
  }

  .admin-hero h1 {
    font-size: 46px;
  }

  .admin-panel h2 {
    font-size: 23px;
  }

  .admin-panel input,
  .admin-panel select,
  .admin-panel textarea {
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
  }

  .admin-panel button {
    width: 100%;
    min-height: 44px;
  }

  .admin-link-button {
    width: 100%;
  }

  .admin-large-textarea {
    min-height: 420px;
  }

  .admin-book-row {
    padding: 12px;
    border-radius: 10px;
  }
}

@media (max-width: 700px) {
  .hero-visual {
    min-height: 0;
    height: min(90vw, 360px);
    margin-top: 4px;
  }
}

@media (max-width: 620px) {
  .hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: flex-start;
  }
}

/* ===================================================
   MOBILE IMPROVEMENTS ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â€šÂ¬Ã‚Â enhanced readability & UX
   =================================================== */

/* Better base font size for mobile reading */
@media (max-width: 760px) {
  html {
    font-size: 16px;
  }

  body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  /* ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ Navigation ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ */
  .topbar {
    position: fixed;
    top: 0;
    z-index: 200;
  }

  .nav-wrap {
    gap: 10px;
    padding: 8px 0 6px;
  }

  .brand {
    font-size: 16px;
    padding: 6px 12px 6px 8px;
    gap: 8px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
  }

  /* Mobile menu ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â€šÂ¬Ã‚Â full-width pill links */
  .main-nav.open,
  .topnav.open {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0 10px;
    border-top: 1px solid rgba(17, 168, 242, 0.12);
    margin-top: 4px;
  }

  .main-nav a,
  .topnav a,
  .lang {
    padding: 13px 18px;
    font-size: 14px;
    border-radius: 12px;
    text-align: left;
  }

  .main-nav a.active,
  .topnav a.active {
    border-radius: 12px;
  }

  /* ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ Hero section ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ */
  .hero {
    padding: 75px 0 40px;
  }

  .hero-title {
    font-size: clamp(52px, 18vw, 80px);
    margin-bottom: 12px;
    line-height: 0.9;
  }

  .hero-sub {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-left: 5px;
  }

  .hero-panel {
    padding: 16px;
    border-radius: 18px;
  }

  .hero-tabs {
    margin-left: 0;
    margin-bottom: 14px;
    gap: 8px;
  }

  .tab {
    padding: 11px 14px;
    font-size: 13px;
    border-radius: 12px;
    border-width: 1.5px;
    flex: 1;
    text-align: center;
  }

  /* ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ Topic cards ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ */
  .topic-list {
    gap: 10px;
  }

  .topic-card {
    grid-template-columns: 42px 1fr;
    gap: 12px;
    padding: 10px 14px;
    min-height: 60px;
    min-width: inherit;
    font-size: 12px;
    font-weight: 700;
    border-radius: 14px;
    line-height: 1.3;
  }

  .topic-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  /* ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ 3D viewer ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ */
  .hero-visual {
    min-height: 0;
    height: min(90vw, 420px);
    margin-top: 4px;
  }

  .sketchfab-embed-wrapper {
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .hero-ring {
    width: min(84vw, 320px);
    border-width: 4px;
  }

  /* ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ Leaderboard ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ */
  .leaders {
    padding: 60px 0 40px;
  }

  .leaders-shell {
    padding: 0 4px;
  }

  .leaders-header {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-width: 8px;
    border-radius: 18px;
    margin-top: -40px;
  }

  .leaders-badge {
    flex: 0 0 48px;
  }

  .leaders-badge img {
    width: 48px;
    height: 48px;
  }

  .leaders-copy h2 {
    font-size: clamp(20px, 6vw, 32px);
    line-height: 1.1;
  }

  .leaders-copy p {
    font-size: 11px;
  }

  .leader-row {
    grid-template-columns: 38px 42px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    min-height: 68px;
  }

  .leader-place {
    width: 34px;
    height: 34px;
    font-size: 16px;
    border-radius: 10px;
  }

  .leader-avatar {
    width: 42px;
    height: 42px;
    border-radius: 8px;
  }

  .leader-name {
    font-size: 15px;
    line-height: 1.3;
  }

  .leader-score {
    font-size: 20px;
    min-width: 44px;
  }

  /* ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ Footer ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 24px 16px 18px;
    border-radius: 20px 20px 0 0;
    margin-top: 0;
  }

  .footer-brand {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .footer-about p {
    font-size: 12px;
    margin-bottom: 14px;
  }

  .footer-col {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 8px;
  }

  .footer-col h3 {
    margin: 10px 0 10px;
    font-size: 13px;
  }

  .footer-col a {
    font-size: 12px;
    margin-bottom: 8px;
    padding: 2px 0;
  }

  .footer-bottom {
    font-size: 10px;
    padding: 12px 0 20px;
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }

  /* ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ Atlas / osteology pages ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ */
  .atlas-chip {
    padding: 8px 14px;
    font-size: 12px;
    width: auto;
    flex: 1;
    text-align: center;
  }

  .atlas-switch {
    flex-wrap: wrap;
  }

  .atlas-part {
    font-size: 11px;
    min-height: 64px;
    padding: 10px 8px;
    border-radius: 10px;
  }

  .atlas-parts {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  /* ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ Books page ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ */
  .book-open {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    min-height: 120px;
    border-radius: 16px;
  }

  .book-cover img {
    min-height: 96px;
  }

  .book-card-copy strong {
    font-size: 17px;
    line-height: 1.2;
  }

  .book-card-copy small {
    font-size: 13px;
    line-height: 1.5;
  }

  .book-card-copy em {
    font-size: 11px;
  }

  .book-card-copy span {
    font-size: 11px;
  }

  .reader-page p {
    font-size: 16px;
    line-height: 1.75;
  }

  .reader-page h3 {
    font-size: 20px;
  }

  /* ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ Admin page ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚ÂÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ */
  .admin-panel input,
  .admin-panel select,
  .admin-panel textarea {
    font-size: 16px;
    /* prevents iOS zoom on focus */
  }

  .book-search input {
    font-size: 16px;
    /* prevents iOS zoom on focus */
    min-height: 52px;
  }
}

/* Very small phones (ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã‚Â°Ãƒâ€šÃ‚Â¤ 390px) */
@media (max-width: 390px) {
  .container {
    width: calc(100% - 16px);
  }

  .hero-title {
    font-size: clamp(46px, 17vw, 70px);
  }

  .hero-sub {
    font-size: 12px;
  }

  .tab {
    font-size: 12px;
    padding: 10px 10px;
  }

  .topic-card {
    font-size: 13px;
  }

  .leader-row {
    grid-template-columns: 34px 38px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px 12px;
  }

  .leader-name {
    font-size: 14px;
  }

  .leader-score {
    font-size: 18px;
  }

  .book-open {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
  }

  .book-card-copy strong {
    font-size: 15px;
  }

  .atlas-chip {
    font-size: 11px;
    padding: 7px 10px;
  }
}

@media (max-width: 760px) {
  .hero-inner {
    justify-content: center;
    gap: 24px;
  }

  .hero-left {
    width: 100%;
    display: grid;
    justify-items: center;
    text-align: center;
  }

  .hero-title {
    width: 100%;
    text-align: center;
    letter-spacing: -3px;
  }

  .hero-sub {
    margin-left: 0;
    max-width: 520px;
  }

  .hero-panel {
    width: min(100%, 420px);
  }

  .leader-row {
    grid-template-columns: 34px 40px minmax(0, 1fr) max-content;
    align-items: center;
  }

  .leader-name {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .leader-score {
    grid-column: auto;
    justify-self: end;
    align-self: center;
    white-space: nowrap;
  }
}

@media (max-width: 390px) {
  .hero-title {
    letter-spacing: -2px;
  }

  .leader-row {
    grid-template-columns: 30px 34px minmax(0, 1fr) max-content;
    gap: 6px;
  }

  .leader-score {
    grid-column: auto;
    min-width: 34px;
    font-size: 17px;
  }
}

.main-nav a {
  color: #00447aed;
}

/* Touch target improvements for all mobile */
@media (hover: none) and (pointer: coarse) {

  .main-nav a,
  .topnav a,
  .tab,
  .topic-card,
  .leader-row,
  .book-open,
  .atlas-card,
  .atlas-part,
  .atlas-chip {
    -webkit-tap-highlight-color: rgba(17, 168, 242, 0.15);
  }

  /* Ensure min touch target of 44px */
  .menu-toggle,
  .reader-close,
  .viewer-close,
  .reader-page-arrow,
  .book-upload-submit,
  .download-pdf {
    min-height: 44px;
    min-width: 44px;
  }

  /* Disable hover transforms on touch to avoid stuck states */
  .topic-card:hover,
  .atlas-card:hover,
  .leader-row:hover,
  .book-open:hover {
    transform: none;
    box-shadow: inherit;
  }
}