:root {
  --black: #0b0b0d;
  --dark: #151519;
  --red: #d71920;
  --red-dark: #a80f15;
  --white: #ffffff;
  --off-white: #f6f6f7;
  --gray: #6f7278;
  --border: #e4e4e7;
  --panel: #ffffff;
  --shadow: 0 18px 45px rgba(11, 11, 13, 0.12);
}

body.dark-mode {
  --black: #f7f7f8;
  --dark: #050506;
  --white: #111114;
  --off-white: #18181d;
  --gray: #b5b5bd;
  --border: #2c2c33;
  --panel: #15151a;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
}

body.dark-mode .site-header {
  background: #09090b;
  border-bottom-color: transparent;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

body.dark-mode .logo span,
body.dark-mode .nav-links,
body.dark-mode .theme-toggle,
body.dark-mode .login-button,
body.dark-mode .menu-toggle {
  color: #ffffff;
}

body.dark-mode .menu-toggle span {
  background: #ffffff;
}

body.dark-mode .theme-toggle,
body.dark-mode .login-button,
body.dark-mode .menu-toggle {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .theme-toggle:hover,
body.dark-mode .login-button:hover {
  color: #ffffff;
  background: var(--red);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  overflow-y: auto;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: "Inter", Arial, sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-x: clip;
  overflow-y: visible;
  animation: pageEnter 0.42s ease both;
}

body.home-dynamic-background {
  position: relative;
  background:
    radial-gradient(circle at 78% 18%, rgba(11, 11, 13, 0.065), transparent 28%),
    #f5f6f8;
}

body.home-dynamic-background::before,
body.home-dynamic-background::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
}

body.home-dynamic-background::before {
  inset: 0;
  background:
    linear-gradient(rgba(11, 11, 13, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 11, 13, 0.18) 1px, transparent 1px);
  background-size: 112px 112px;
  background-position: 0 0;
  opacity: 0.82;
  animation: pageBackgroundScan 16s linear infinite alternate;
}

body.home-dynamic-background::after {
  inset: 0;
  background:
    radial-gradient(circle at 18% 26%, rgba(11, 11, 13, 0.055) 0 10%, transparent 28%),
    radial-gradient(circle at 52% 82%, rgba(11, 11, 13, 0.045) 0 9%, transparent 28%);
  mix-blend-mode: multiply;
  opacity: 0.56;
  animation: pageBackgroundFloat 18s ease-in-out infinite alternate;
}

body.home-dynamic-background .site-header,
body.home-dynamic-background main,
body.home-dynamic-background .footer {
  position: relative;
  z-index: 1;
}

body.home-dynamic-background .footer {
  z-index: 2;
  background: #111114;
  box-shadow: 0 -18px 42px rgba(11, 11, 13, 0.16);
}

body.home-dynamic-background .site-header {
  z-index: 20;
}

body.home-dynamic-background .home-showcase,
body.home-dynamic-background .calculator-feature,
body.home-dynamic-background .home-blog-strip,
body.home-dynamic-background .split-section,
body.home-dynamic-background .posts-section,
body.home-dynamic-background .calculators-section,
body.home-dynamic-background .calculator-detail-section {
  background: transparent;
}

body.home-dynamic-background .home-blog-strip {
  color: var(--black);
}

body.home-dynamic-background .home-blog-strip::before {
  content: none;
  display: none;
  animation: none;
}

body.home-dynamic-background .home-blog-strip .section-heading p:not(.eyebrow) {
  color: var(--gray);
}

body.home-dynamic-background .home-showcase,
body.home-dynamic-background .calculator-feature {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.home-dynamic-background .home-hero::before {
  content: none;
}

body.dark-mode.home-dynamic-background {
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.045), transparent 28%),
    #0f0f13;
}

body.dark-mode.home-dynamic-background::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.145) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.145) 1px, transparent 1px);
  background-size: 112px 112px;
  background-position: 0 0;
  opacity: 0.86;
  animation: pageBackgroundScan 16s linear infinite alternate;
}

body.dark-mode.home-dynamic-background::after {
  background:
    radial-gradient(circle at 18% 26%, rgba(255, 255, 255, 0.045) 0 10%, transparent 28%),
    radial-gradient(circle at 52% 82%, rgba(255, 255, 255, 0.035) 0 9%, transparent 28%);
  mix-blend-mode: normal;
  opacity: 0.56;
}

body.dark-mode.home-dynamic-background .home-showcase,
body.dark-mode.home-dynamic-background .calculator-feature,
body.dark-mode.home-dynamic-background .home-blog-strip,
body.dark-mode.home-dynamic-background .split-section,
body.dark-mode.home-dynamic-background .posts-section,
body.dark-mode.home-dynamic-background .calculators-section,
body.dark-mode.home-dynamic-background .calculator-detail-section {
  background: transparent;
}

body.dark-mode.home-dynamic-background .home-blog-strip {
  color: var(--black);
}

@keyframes pageBackgroundScan {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 112px 56px;
  }
}

@keyframes pageBackgroundFloat {
  from {
    transform: translate3d(-1.5%, -1%, 0) scale(1);
  }

  to {
    transform: translate3d(1.5%, 1%, 0) scale(1.04);
  }
}

main {
  flex: 1 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  max-width: 100%;
}

img,
video {
  max-width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #09090b;
  border-bottom: 0;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--red);
  box-shadow: 0 1px 0 rgba(168, 15, 21, 0.9);
  pointer-events: none;
}

body.dark-mode .site-header::after {
  height: 3px;
  background: var(--red);
  box-shadow: 0 1px 0 rgba(168, 15, 21, 0.9);
}

.navbar {
  width: min(1480px, calc(100% - 16px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(12px, 1.2vw, 22px);
}

.logo {
  display: inline-flex;
  align-items: center;
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 800;
  white-space: nowrap;
  transform-origin: left center;
  transition:
    transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
    text-shadow 0.32s ease;
}

.logo:hover,
.logo:focus-visible {
  text-shadow: 0 10px 24px rgba(215, 25, 32, 0.34);
  transform: scale(1.12);
}

.logo span {
  color: #ffffff;
}

.logo strong {
  color: var(--red);
  transition: color 0.32s ease;
}

.logo:hover strong,
.logo:focus-visible strong {
  color: #ff5a60;
}

.nav-links {
  flex: 0 1 auto;
  justify-content: flex-start;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.45vw, 24px);
  padding: 0;
  margin: 0 0 0 clamp(8px, 1.4vw, 24px);
  color: #ffffff;
  list-style: none;
  font-size: 0.84rem;
  font-weight: 700;
  transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1), gap 0.34s ease;
}

.navbar.has-open-search .nav-links,
.navbar:has(.site-search.is-open) .nav-links,
.navbar:has(.site-search:focus-within) .nav-links {
  gap: clamp(10px, 1vw, 16px);
  transform: none;
}

.nav-links li {
  position: relative;
  white-space: nowrap;
}

.nav-links a {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px clamp(14px, 1.1vw, 18px);
  border: 1px solid transparent;
  border-radius: 999px;
  white-space: nowrap;
  transition:
    color 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.28s ease;
}

.nav-links a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.04));
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.26s ease, transform 0.26s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 7px;
  left: 16px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 110, 116, 0.15), rgba(255, 110, 116, 0.95), rgba(255, 110, 116, 0.15));
  opacity: 0;
  transform: scaleX(0.22);
  transform-origin: center;
  transition: opacity 0.24s ease, transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: #ffffff;
  border-color: rgba(255, 116, 122, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 14px 28px rgba(0, 0, 0, 0.22);
  transform: translateY(-2px);
}

.nav-links a:hover::before,
.nav-links a:focus-visible::before {
  opacity: 1;
  transform: scale(1);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-dropdown {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: -14px;
}

.nav-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  right: -10px;
  left: -10px;
  height: 18px;
}

.nav-submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  display: grid;
  min-width: 210px;
  padding: 10px;
  background: rgba(17, 17, 20, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.96);
  transform-origin: top left;
  transition:
    opacity 0.24s ease,
    transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.2s ease;
  visibility: hidden;
}

.nav-submenu::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 18px;
}

.nav-dropdown:hover .nav-submenu,
.nav-dropdown:focus-within .nav-submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.nav-submenu a {
  min-height: 40px;
  padding: 10px 14px;
  border: 0;
  border-radius: 14px;
  white-space: nowrap;
}

.nav-submenu a:hover {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(255, 95, 102, 0.95), rgba(181, 15, 22, 0.92));
}

body.dark-mode .nav-submenu {
  background: rgba(17, 17, 20, 0.92);
  border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .toc-link {
  color: #ff8b8f;
}

body.dark-mode .toc-link-child {
  color: #ff9da1;
}

body.dark-mode .toc-link-child.level-4,
body.dark-mode .toc-link-child.level-5,
body.dark-mode .toc-link-child.level-6 {
  color: #ffb3b6;
}

body.dark-mode .toc-toggle {
  color: #ff8b8f;
}

.header-actions {
  position: relative;
  z-index: 40;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.navbar.has-open-search .header-actions,
.navbar:has(.site-search.is-open) .header-actions,
.navbar:has(.site-search:focus-within) .header-actions {
  min-width: min(440px, 34vw);
}

.site-search {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 56px;
  transition: width 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.site-search.is-open,
.site-search:focus-within {
  width: 56px;
}

.site-search-field {
  position: absolute;
  right: 64px;
  width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(16px) scaleX(0.92);
  transform-origin: right center;
  transition:
    width 0.34s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.22s ease,
    transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.site-search.is-open .site-search-field,
.site-search:focus-within .site-search-field {
  width: min(300px, 24vw);
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scaleX(1);
}

.site-search input {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.06));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 16px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-search input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.site-search-toggle {
  position: relative;
  z-index: 2;
  width: 48px;
  min-height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  cursor: pointer;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease,
    filter 0.22s ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 26px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.search-toggle-icon {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.search-toggle-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-search-toggle:hover,
.site-search-toggle:focus-visible,
.site-search.is-open .site-search-toggle {
  border-color: rgba(255, 111, 117, 0.46);
  background:
    linear-gradient(180deg, rgba(255, 95, 102, 0.92), rgba(181, 15, 22, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 16px 28px rgba(215, 25, 32, 0.28);
  transform: translateY(-1px) scale(1.045);
  filter: saturate(1.06);
}

.site-search.is-open .site-search-toggle {
  animation: searchButtonSpin 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes searchButtonSpin {
  0% {
    transform: rotate(0deg) scale(0.98);
  }

  70% {
    transform: rotate(340deg) scale(1.08);
  }

  100% {
    transform: rotate(360deg) scale(1.04);
  }
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 12px);
  left: auto;
  right: 0;
  width: min(320px, 76vw);
  z-index: 80;
  display: none;
  gap: 6px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(228, 228, 231, 0.92);
  border-radius: 18px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.search-suggestions.is-open {
  display: grid;
}

.search-suggestions a,
.search-suggestions p {
  margin: 0;
  padding: 10px;
  color: #111114;
  border-radius: 6px;
  text-decoration: none;
}

.search-suggestions a {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  align-items: center;
}

.search-suggestions a:hover {
  background: #fff1f2;
}

.search-suggestions img,
.search-suggestion-placeholder {
  display: block;
  width: 46px;
  height: 46px;
  object-fit: cover;
  background: #f1f1f3;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
}

.search-suggestions strong,
.search-suggestions small,
.search-suggestions em {
  display: block;
}

.search-suggestions small {
  margin-bottom: 2px;
  color: var(--red);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search-suggestions strong {
  font-size: 0.9rem;
  line-height: 1.25;
}

.search-suggestions em,
.search-suggestions p {
  color: #626671;
  font-size: 0.78rem;
  font-style: normal;
  line-height: 1.35;
}

body.dark-mode .site-search input {
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 28px rgba(0, 0, 0, 0.4);
}

body.dark-mode .site-search input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

body.dark-mode .search-suggestions {
  background: rgba(24, 24, 27, 0.96);
  border-color: rgba(82, 82, 91, 0.92);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.45);
}

body.dark-mode .search-suggestions a,
body.dark-mode .search-suggestions p {
  color: #f4f4f5;
}

body.dark-mode .search-suggestions a:hover {
  background: rgba(215, 25, 32, 0.22);
}

body.dark-mode .search-suggestions em,
body.dark-mode .search-suggestions p {
  color: #c9cbd1;
}

body.dark-mode .search-suggestions img,
body.dark-mode .search-suggestion-placeholder {
  background: #27272a;
  border-color: #3f3f46;
}

.site-social-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-social-link {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 46px;
  min-height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 26px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    background 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease,
    filter 0.22s ease;
}

.site-social-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-social-link:hover,
.site-social-link:focus-visible {
  border-color: rgba(255, 111, 117, 0.46);
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 95, 102, 0.92), rgba(181, 15, 22, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 16px 28px rgba(215, 25, 32, 0.28);
  transform: translateY(-1px) scale(1.045);
  filter: saturate(1.06);
}

.social-link-text {
  line-height: 1;
}

.hero-social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.hero-social-label {
  color: var(--gray);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-social-links .site-social-link {
  width: auto;
  min-height: 44px;
  gap: 8px;
  padding: 0 14px;
  color: #111114;
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(11, 11, 13, 0.12);
  box-shadow: 0 12px 26px rgba(11, 11, 13, 0.09);
}

.hero-social-links .site-social-link:hover,
.hero-social-links .site-social-link:focus-visible {
  color: #ffffff;
  border-color: rgba(215, 25, 32, 0.3);
}

body.dark-mode .hero-social-links .site-social-link {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.theme-toggle,
.login-button,
.menu-toggle {
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  border-radius: 16px;
  cursor: pointer;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.22s ease,
    filter 0.22s ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 14px 28px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.theme-toggle {
  width: 46px;
  height: 46px;
  font-size: 1.08rem;
  font-weight: 800;
}

.theme-toggle.is-spinning {
  animation: themeSymbolSpin 0.52s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes themeSymbolSpin {
  0% {
    transform: rotate(0deg) scale(0.96);
  }

  55% {
    transform: rotate(250deg) scale(1.12);
  }

  100% {
    transform: rotate(360deg) scale(1);
  }
}

.login-button {
  min-height: 46px;
  padding: 10px 16px;
  border-color: rgba(255, 109, 115, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 108, 114, 0.26), rgba(255, 255, 255, 0.08));
  letter-spacing: 0.01em;
  font-weight: 800;
}

.theme-toggle:hover,
.login-button:hover {
  border-color: rgba(255, 111, 117, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 95, 102, 0.92), rgba(181, 15, 22, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 16px 28px rgba(215, 25, 32, 0.28);
  transform: translateY(-1px) scale(1.045);
  filter: saturate(1.06);
}

.profile-menu {
  position: relative;
}

.profile-trigger {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.22s ease;
}

.profile-trigger:hover {
  box-shadow: 0 12px 24px rgba(215, 25, 32, 0.18);
  transform: translateY(-1px) scale(1.04);
}

.profile-trigger img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 999px;
  border: 2px solid var(--red);
}

.profile-submenu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 35;
  display: none;
  min-width: 150px;
  padding: 8px;
  background: #111114;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
}

.profile-submenu::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 12px;
}

.profile-menu:hover .profile-submenu,
.profile-menu:focus-within .profile-submenu {
  display: grid;
}

.profile-submenu a,
.profile-submenu button {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  white-space: nowrap;
}

.profile-submenu a:hover,
.profile-submenu button:hover {
  background: var(--red);
}

body.dark-mode .profile-trigger {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .profile-submenu {
  background: #111114;
  border-color: rgba(255, 255, 255, 0.16);
}

body.dark-mode .profile-submenu a,
body.dark-mode .profile-submenu button {
  color: #ffffff;
}

body.dark-mode .profile-submenu a:hover,
body.dark-mode .profile-submenu button:hover {
  color: #ffffff;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #ffffff;
  transition:
    transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.22s ease,
    background 0.22s ease;
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

main > .section:not(.hero):not(.page-hero):not(.social-tabs):not(.social-layout) {
  content-visibility: auto;
  contain-intrinsic-size: 1px 720px;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(8px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease,
    filter 0.7s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.reveal-on-scroll.reveal-soft {
  transform: translateY(16px);
}

.reveal-on-scroll.reveal-hero {
  transform: translateY(18px) scale(0.985);
}

.reveal-on-scroll.reveal-hero.is-visible {
  transform: translateY(0) scale(1);
}

.section.wide-editor {
  width: calc(100% - 48px);
  max-width: none;
}

.hero {
  position: relative;
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  align-items: center;
  gap: 48px;
  overflow: hidden;
}

.hero-content h1,
.page-hero h1 {
  max-width: 840px;
  margin: 14px 0 20px;
  font-size: clamp(2.45rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: 0;
}

.typewriter-title {
  min-height: 3em;
}

.typewriter-title::after {
  content: "";
  display: inline-block;
  width: 0.08em;
  height: 0.82em;
  margin-left: 0.08em;
  background: var(--red);
  vertical-align: -0.06em;
  animation: typewriterCaret 0.9s steps(1) infinite;
}

@keyframes typewriterCaret {
  50% {
    opacity: 0;
  }
}

body:has(#editor-form) .page-hero {
  padding-top: clamp(18px, 3vw, 34px);
  padding-bottom: clamp(24px, 4vw, 38px);
}

body:has(#editor-form) .page-hero h1 {
  max-width: 760px;
  margin: 8px 0 12px;
  font-size: clamp(1.9rem, 3.2vw, 3.2rem);
  line-height: 1.05;
}

body:has(#editor-form) .page-hero p:not(.eyebrow) {
  max-width: 620px;
  font-size: 1rem;
}

.hero-text,
.page-hero p:not(.eyebrow) {
  max-width: 690px;
  margin: 0;
  color: var(--gray);
  font-size: 1.1rem;
}

.eyebrow {
  margin: 0;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-actions,
.article-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
  overflow: visible;
}

.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(11, 11, 13, 0.1);
  transition:
    transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.32s ease,
    color 0.32s ease,
    border-color 0.32s ease,
    box-shadow 0.32s ease;
  will-change: transform;
}

.btn-click-effect {
  position: absolute;
  z-index: 0;
  width: 18px;
  height: 18px;
  left: var(--click-x, 50%);
  top: var(--click-y, 50%);
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.82) 0 8%, rgba(255, 255, 255, 0.34) 30%, rgba(215, 25, 32, 0.16) 54%, transparent 72%);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  animation: buttonClickRipple 0.62s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.btn.is-clicking,
button.is-clicking,
.toolbar-menu-trigger.is-clicking,
.toolbar-style-button.is-clicking,
.category-card.is-clicking,
.calc-category.is-clicking {
  animation: buttonPressPop 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 1px;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 58%);
  opacity: 0.75;
  pointer-events: none;
}

.btn::after {
  content: none;
}

.btn > * {
  position: relative;
  z-index: 1;
}

.btn:hover {
  box-shadow: 0 18px 36px rgba(11, 11, 13, 0.15);
  transform: translateY(-2px) scale(1.035);
}

.btn:active {
  transform: translateY(0) scale(1.01);
}

.btn:focus-visible {
  outline: 3px solid rgba(215, 25, 32, 0.32);
  outline-offset: 4px;
}

button,
.btn,
.category-card,
.calc-category,
.toolbar-menu-trigger,
.toolbar-style-button,
.toc-link,
.toc-toggle {
  -webkit-tap-highlight-color: transparent;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  color: #ffffff;
  background:
    radial-gradient(circle at 24% 24%, rgba(215, 25, 32, 0.34), transparent 30%),
    linear-gradient(135deg, rgba(9, 9, 11, 0.94), rgba(20, 20, 24, 0.96));
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 0.26s ease,
    transform 0.26s ease;
}

.page-loader.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.page-loader-inner {
  display: grid;
  justify-items: center;
  gap: 16px;
}

.page-loader-mark {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 42px rgba(215, 25, 32, 0.28);
}

.page-loader-mark::before,
.page-loader-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  border: 3px solid transparent;
  border-top-color: #ffffff;
  border-right-color: var(--red);
  animation: pageLoaderSpin 0.82s linear infinite;
}

.page-loader-mark::after {
  inset: 20px;
  border-width: 2px;
  border-top-color: rgba(255, 255, 255, 0.4);
  border-right-color: #ff5a60;
  animation-duration: 1.2s;
  animation-direction: reverse;
}

.page-loader-text {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@keyframes buttonClickRipple {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(18);
  }
}

@keyframes buttonPressPop {
  0% {
    transform: scale(1);
  }

  42% {
    transform: scale(0.965);
  }

  100% {
    transform: scale(1);
  }
}

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

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cursor-trail-dot {
  display: none;
  position: fixed;
  z-index: 15;
  width: var(--trail-size, 20px);
  height: var(--trail-size, 20px);
  left: 0;
  top: 0;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.58) 0 18%, rgba(215, 25, 32, 0.28) 22%, rgba(215, 25, 32, 0) 72%);
  box-shadow: 0 0 22px rgba(215, 25, 32, 0.28);
  opacity: 0.72;
  pointer-events: none;
  transform: translate3d(var(--trail-x, 0), var(--trail-y, 0), 0) translate(-50%, -50%) scale(1);
  animation: cursorTrailFade 0.85s ease-out forwards;
  mix-blend-mode: screen;
}

body.dark-mode .cursor-trail-dot {
  border-color: rgba(255, 255, 255, 0.22);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.72) 0 15%, rgba(255, 74, 80, 0.34) 24%, rgba(255, 74, 80, 0) 74%);
  box-shadow: 0 0 28px rgba(255, 74, 80, 0.34);
}

@keyframes cursorTrailFade {
  to {
    opacity: 0;
    transform: translate3d(var(--trail-x, 0), var(--trail-y, 0), 0) translate(-50%, -50%) scale(0.28);
  }
}

.btn-primary {
  z-index: 0;
  color: #ffffff;
  background: linear-gradient(135deg, #f0444a 0%, var(--red) 48%, var(--red-dark) 100%);
  box-shadow: 0 14px 30px rgba(215, 25, 32, 0.24);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.24);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ff5a60 0%, var(--red) 42%, #8e0d12 100%);
  box-shadow: 0 20px 38px rgba(215, 25, 32, 0.32);
}

.btn-secondary {
  z-index: 0;
  color: #111114;
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(11, 11, 13, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  color: #09090b;
  border-color: rgba(215, 25, 32, 0.34);
  background: rgba(255, 255, 255, 0.92);
}

.hero-media {
  position: relative;
}

.hero-media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.home-hero {
  isolation: isolate;
  min-height: 620px;
  padding-top: clamp(56px, 7vh, 92px);
  padding-bottom: clamp(48px, 6vh, 78px);
}

.home-hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: clamp(18px, 3vw, 34px) 0 auto;
  height: 42%;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.05) 46%, rgba(215, 25, 32, 0.035)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(11, 11, 13, 0.08);
  pointer-events: none;
  opacity: 0.58;
  animation: homeGlassDrift 12s ease-in-out infinite alternate;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.fitness-word-stream {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
  align-content: space-evenly;
  gap: 18px;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.09;
  overflow: visible;
  mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

.fitness-word-stream::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--white) 0%, transparent 20%, transparent 80%, var(--white) 100%),
    radial-gradient(circle at 34% 43%, var(--white) 0 17%, transparent 37%),
    radial-gradient(circle at 66% 47%, var(--white) 0 13%, transparent 33%);
}

.fitness-word-stream div {
  width: max-content;
  color: rgba(11, 11, 13, 0.88);
  font-size: clamp(1.05rem, 2.4vw, 2.45rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-shadow: 0 10px 28px rgba(215, 25, 32, 0.14);
  animation: fitnessWordsLeft 18s linear infinite alternate;
}

.fitness-word-stream div:nth-child(2) {
  color: rgba(11, 11, 13, 0.78);
  animation: fitnessWordsRight 20s linear infinite alternate;
}

.home-hero > :not(.fitness-word-stream) {
  position: relative;
  z-index: 2;
}

.home-hero .hero-content {
  animation: homeContentFloat 7s ease-in-out infinite;
}

.home-hero .hero-actions .btn-primary {
  position: relative;
}

.home-hero-media img {
  animation: homeImageFloat 8s ease-in-out infinite;
}

@keyframes fitnessWordsLeft {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-35%);
  }
}

@keyframes fitnessWordsRight {
  from {
    transform: translateX(-45%);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes homeGlassDrift {
  from {
    transform: translate3d(-1.5%, 0, 0);
  }

  to {
    transform: translate3d(1.5%, 10px, 0);
  }
}

@keyframes homeContentFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes homeImageFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-12px) scale(1.015);
  }
}

@keyframes buttonLightSweep {
  0%,
  52% {
    transform: translateX(0) skewX(-18deg);
  }

  78%,
  100% {
    transform: translateX(430%) skewX(-18deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.home-dynamic-background::before,
  body.home-dynamic-background::after,
  .cursor-trail-dot {
    animation: none;
  }

  .cursor-trail-dot {
    display: none;
  }

  .fitness-word-stream div {
    animation: none;
  }

  .home-hero::before,
  .home-hero .hero-content,
  .home-hero-media img,
  .home-visual-card,
  .home-visual-card img,
  .calculator-feature-grid div,
  .home-blog-strip::before {
    animation: none;
  }

  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }

  .typewriter-title::after {
    animation: none;
  }

  .btn-click-effect,
  .page-loader-mark::before,
  .page-loader-mark::after {
    animation: none;
  }

  .page-loader {
    transition: none;
  }

  body {
    animation: none;
  }
}

.home-hero-media img {
  aspect-ratio: 5 / 6;
}

.calculator-feature-grid div {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 12px 28px rgba(11, 11, 13, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.calculator-feature-grid strong {
  display: block;
  color: var(--red);
  font-size: 1.35rem;
  line-height: 1;
}

.calculator-feature-grid span {
  display: block;
  color: var(--gray);
  font-weight: 700;
}

.home-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: -14px;
  padding: 14px;
  overflow: visible;
}

.home-showcase {
  background:
    linear-gradient(180deg, rgba(251, 251, 252, 0.86), rgba(255, 255, 255, 0.74)),
    #fbfbfc;
  overflow: visible;
}

.home-visual-card {
  display: grid;
  grid-template-rows: 220px 1fr;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
  transition: transform 0.24s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  animation: cardBreath 8s ease-in-out infinite;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.home-visual-card:hover {
  border-color: var(--red);
  box-shadow: 0 24px 54px rgba(215, 25, 32, 0.18);
  animation: none;
  transform: translateY(-8px) scale(1.045);
}

.home-visual-card:hover img {
  animation-play-state: paused;
  transform: scale(1.1);
}

.home-visual-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: imageSlowPan 12s ease-in-out infinite alternate;
}

.home-visual-card:nth-child(2) {
  animation-delay: -2.4s;
}

.home-visual-card:nth-child(2) img {
  animation-delay: -4s;
}

.home-visual-card:nth-child(3) {
  animation-delay: -4.8s;
}

.home-visual-card:nth-child(3) img {
  animation-delay: -8s;
}

.home-visual-card div {
  padding: 22px;
}

.home-visual-card span {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.home-visual-card h3 {
  margin: 0 0 10px;
  font-size: 1.22rem;
  line-height: 1.25;
}

.home-visual-card p {
  margin: 0;
  color: var(--gray);
}

.calculator-feature {
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: minmax(16px, 1fr) minmax(0, 500px) minmax(320px, 590px) minmax(16px, 1fr);
  align-items: center;
  gap: 34px;
  background:
    linear-gradient(180deg, rgba(251, 251, 252, 0.9), rgba(255, 255, 255, 0.78)),
    #fbfbfc;
  overflow: visible;
}

.calculator-feature-text {
  grid-column: 2;
}

.calculator-feature-grid {
  grid-column: 3;
}

.calculator-feature-text h2 {
  margin: 8px 0 14px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
}

.calculator-feature-text p:not(.eyebrow) {
  max-width: 640px;
  margin: 0;
  color: var(--gray);
}

.calculator-feature-text .btn {
  margin-top: 26px;
}

.calculator-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: -14px;
  padding: 14px;
  overflow: visible;
}

.calculator-feature-grid div {
  position: relative;
  overflow: hidden;
  animation: calculatorTileLift 7.5s ease-in-out infinite;
}

.calculator-feature-grid div::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(215, 25, 32, 0.08) 42%, transparent 68%);
  transform: translateX(-115%);
  animation: tileSignalSweep 5.5s ease-in-out infinite;
  pointer-events: none;
}

.calculator-feature-grid div:nth-child(2) {
  animation-delay: -1.1s;
}

.calculator-feature-grid div:nth-child(3) {
  animation-delay: -2.2s;
}

.calculator-feature-grid div:nth-child(4) {
  animation-delay: -3.3s;
}

.home-feature-posts {
  grid-column: 2 / 4;
  width: 100%;
  margin-top: 28px;
}

.home-feature-posts .section-heading {
  margin-bottom: 24px;
}

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

.home-blog-strip {
  position: relative;
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: minmax(16px, 1fr) minmax(0, 730px) minmax(240px, 330px) minmax(16px, 1fr);
  align-items: flex-end;
  gap: 28px;
  padding-top: 88px;
  padding-bottom: 88px;
  margin-bottom: 0;
  background:
    linear-gradient(135deg, #070708 0%, #111114 48%, #1b1b20 100%);
  color: #ffffff;
  overflow: hidden;
}

body.home-dynamic-background main {
  padding-bottom: 0;
}

.home-blog-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.08) 28%, transparent 48%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 120px);
  animation: blogStripScan 10s linear infinite;
  pointer-events: none;
}

body.home-dynamic-background .home-blog-strip::before {
  content: none;
  display: none;
  animation: none;
}

.home-blog-strip > * {
  position: relative;
  z-index: 1;
}

.home-blog-strip .section-heading {
  grid-column: 2;
}

.home-blog-actions {
  grid-column: 3;
}

.home-blog-strip .section-heading {
  margin-bottom: 0;
}

.home-blog-strip .section-heading p:not(.eyebrow) {
  color: #dedee2;
}

body.home-dynamic-background .home-blog-strip {
  background: transparent;
  color: var(--black);
}

body.home-dynamic-background .home-blog-strip .section-heading p:not(.eyebrow) {
  color: var(--gray);
}

.home-blog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

body.dark-mode .home-visual-card,
body.dark-mode .calculator-feature-grid div {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(32, 32, 39, 0.72);
}

body.dark-mode .home-showcase,
body.dark-mode .calculator-feature {
  background:
    linear-gradient(180deg, rgba(17, 17, 20, 0.92), rgba(24, 24, 29, 0.78)),
    #111114;
}

body.dark-mode.home-dynamic-background .home-showcase,
body.dark-mode.home-dynamic-background .calculator-feature,
body.dark-mode.home-dynamic-background .home-blog-strip {
  background: transparent;
}

body.dark-mode .home-hero::before {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012) 48%, rgba(215, 25, 32, 0.06)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.024), rgba(255, 255, 255, 0));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.24);
  opacity: 0.42;
}

body.dark-mode .btn-primary,
body.dark-mode .btn-primary:hover {
  color: #ffffff;
}

body.dark-mode .btn-secondary {
  color: #111114;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

body.dark-mode .btn-secondary:hover {
  color: #09090b;
  background: #ffffff;
  border-color: rgba(215, 25, 32, 0.45);
}

@keyframes cardBreath {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

@keyframes imageSlowPan {
  from {
    transform: scale(1.04) translateX(-2%);
  }

  to {
    transform: scale(1.08) translateX(2%);
  }
}

@keyframes calculatorTileLift {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }
}

@keyframes tileSignalSweep {
  0%,
  42% {
    transform: translateX(-115%);
  }

  72%,
  100% {
    transform: translateX(115%);
  }
}

@keyframes blogStripScan {
  from {
    transform: translateX(-14%);
  }

  to {
    transform: translateX(14%);
  }
}

body.dark-mode .fitness-word-stream {
  opacity: 0.09;
}

body.dark-mode .fitness-word-stream div,
body.dark-mode .fitness-word-stream div:nth-child(2) {
  color: rgba(255, 255, 255, 0.88);
}

body.dark-mode .fitness-word-stream::after {
  background:
    linear-gradient(90deg, var(--white) 0%, transparent 20%, transparent 80%, var(--white) 100%),
    radial-gradient(circle at 34% 43%, var(--white) 0 17%, transparent 37%),
    radial-gradient(circle at 66% 47%, var(--white) 0 13%, transparent 33%);
}

body.dark-mode .article-page,
body.dark-mode .article-body,
body.dark-mode .article-body p,
body.dark-mode .article-body li,
body.dark-mode .article-body td,
body.dark-mode .article-body th,
body.dark-mode .article-page h1,
body.dark-mode .article-body h1,
body.dark-mode .article-body h2,
body.dark-mode .article-body h3,
body.dark-mode .article-body h4,
body.dark-mode .article-body h5,
body.dark-mode .article-body h6,
body.dark-mode .article-body blockquote,
body.dark-mode .article-summary,
body.dark-mode #article-category,
body.dark-mode .editor-references,
body.dark-mode .editor-inline-references .references h2,
body.dark-mode .references h2,
body.dark-mode .references li {
  color: #f4f4f5;
}

body.dark-mode .references,
body.dark-mode .article-body,
body.dark-mode .article-body h1,
body.dark-mode .article-body h2,
body.dark-mode .article-page h1 {
  border-color: #5b5d66;
}

body.dark-mode .page-hero,
body.dark-mode .page-hero h1,
body.dark-mode .page-hero p:not(.eyebrow),
body.dark-mode .editor-form,
body.dark-mode .editor-form label,
body.dark-mode .editor-form input,
body.dark-mode .editor-form select,
body.dark-mode .editor-form textarea,
body.dark-mode .wiki-note {
  color: #f4f4f5;
}

body.dark-mode .editor-form input,
body.dark-mode .editor-form select,
body.dark-mode .editor-form textarea,
body.dark-mode .custom-category-input,
body.dark-mode .tag-editor,
body.dark-mode .wiki-note {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(21, 21, 26, 0.96);
}

body.dark-mode .editor-form input::placeholder,
body.dark-mode .editor-form textarea::placeholder,
body.dark-mode .custom-category-input::placeholder {
  color: rgba(244, 244, 245, 0.58);
}

body.dark-mode .article-body table,
body.dark-mode .wiki-media {
  background: #18181d;
}

body.dark-mode .article-body th {
  background: #22232a;
}

body.dark-mode .article-body figcaption,
body.dark-mode .wiki-media figcaption,
body.dark-mode .wiki-media figcaption small {
  color: #d8d8de;
}

body.dark-mode .wiki-media figcaption {
  background: rgba(24, 24, 29, 0.88);
  border-color: #5b5d66;
}

body.dark-mode .wiki-canvas .wiki-media figcaption:empty::before {
  color: #a7a7b0;
}

.hero-panel {
  position: absolute;
  left: -26px;
  right: 26px;
  bottom: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
  color: #ffffff;
  background: rgba(11, 11, 13, 0.92);
  border-radius: 8px;
  backdrop-filter: blur(12px);
}

.hero-panel div {
  padding-right: 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-panel div:last-child {
  padding-right: 0;
  border-right: 0;
}

.hero-panel strong {
  display: block;
  color: var(--red);
  font-size: 1.45rem;
  line-height: 1;
}

.hero-panel span {
  display: block;
  margin-top: 6px;
  color: #dedee2;
  font-size: 0.82rem;
  font-weight: 600;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin: 8px 0 10px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
}

.section-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--gray);
}

.split-section,
.posts-section,
.calculators-section {
  width: 100%;
  max-width: none;
  background: var(--off-white);
}

body.home-dynamic-background .split-section,
body.home-dynamic-background .posts-section,
body.home-dynamic-background .calculators-section {
  background: transparent;
}

.split-section > *,
.posts-section > *,
.calculators-section > * {
  width: min(1120px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.feature-grid,
.category-grid,
.blog-grid,
.calculator-grid,
.muscle-grid,
.calculator-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  overflow: visible;
}

.category-grid,
.calculator-category-grid {
  margin: -12px;
  padding: 12px;
}

.muscle-card {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--black);
  background: var(--panel);
}

.muscle-card strong {
  color: var(--red);
}

.muscle-card span {
  color: var(--gray);
}

.social-layout {
  display: block;
}

.social-tabs {
  display: flex;
  gap: 10px;
  padding-bottom: 0;
}

.social-tabs .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.message-count-badge,
.inline-count-badge,
.thread-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--red);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 20px rgba(215, 25, 32, 0.22);
}

.message-count-badge[hidden],
.inline-count-badge[hidden] {
  display: none !important;
}

.nav-links .message-count-badge {
  min-width: 20px;
  min-height: 20px;
  padding: 2px 6px;
  font-size: 0.68rem;
}

.inline-count-badge {
  vertical-align: middle;
  margin-left: 8px;
}

.social-panel {
  display: none;
}

.social-panel.is-active {
  display: block;
}

.social-layout .social-panel.is-active {
  max-width: 920px;
  margin: 0 auto;
}

.social-layout .messages-panel.is-active {
  max-width: min(1120px, 100%);
}

.social-layout {
  gap: 18px;
}

.social-panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(11, 11, 13, 0.06);
}

.social-panel .btn:disabled,
.social-panel .btn[aria-disabled="true"] {
  opacity: 0.64;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.friend-row {
  display: grid;
  grid-template-columns: 52px 1fr repeat(4, auto);
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.friend-row img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 999px;
}

.friend-row span {
  display: block;
  color: var(--gray);
  font-size: 0.9rem;
}

#friend-search-result {
  margin-top: 16px;
}

.friend-search-card {
  grid-template-columns: 52px 1fr auto;
  padding: 14px 0 2px;
  border-bottom: 0;
}

.friend-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.request-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.request-lists h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.request-status {
  justify-self: end;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--gray);
  background: var(--off-white);
  font-weight: 800;
}

.message {
  max-width: min(680px, 78%);
  margin: 10px 0;
  padding: 12px;
  border-radius: 8px 8px 8px 2px;
  background: var(--off-white);
}

.message.mine {
  margin-left: auto;
  color: #ffffff;
  background: var(--red);
  border-radius: 8px 8px 2px 8px;
}

.message span {
  color: var(--gray);
  font-size: 0.78rem;
}

.message.mine span {
  color: rgba(255, 255, 255, 0.72);
}

.message p {
  margin: 4px 0 0;
}

.messages-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  min-height: 560px;
}

.message-people {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.message-person-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: stretch;
}

.message-person-row.is-active .message-person,
.message-person.is-active,
.message-person-row:hover .message-person {
  border-color: var(--red);
  box-shadow: 0 8px 20px rgba(215, 25, 32, 0.12);
}

.message-person {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--black);
  background: var(--off-white);
  cursor: pointer;
  text-align: left;
  min-width: 0;
}

.message-person:hover {
  border-color: var(--red);
  box-shadow: 0 8px 20px rgba(215, 25, 32, 0.12);
}

.message-profile-link {
  display: grid;
  place-items: center;
  min-width: 62px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--red);
  background: var(--white);
  font-size: 0.82rem;
  font-weight: 900;
}

.message-profile-link:hover {
  border-color: var(--red);
  box-shadow: 0 8px 20px rgba(215, 25, 32, 0.12);
}

button.message-profile-link {
  cursor: pointer;
}

.message-person img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 999px;
  grid-row: span 2;
}

.message-person span {
  min-width: 0;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-person-title {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.message-person-title > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-unread-badge {
  flex: 0 0 auto;
  min-width: 22px;
  min-height: 22px;
  padding: 3px 6px;
  font-size: 0.7rem;
}

.message-person small {
  color: var(--gray);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-conversation {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(340px, 1fr) auto auto;
  gap: 10px;
}

#message-thread {
  min-height: 340px;
  max-height: 540px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
}

.chat-head {
  position: sticky;
  top: -14px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -14px -14px 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--black);
  background: var(--panel);
}

.chat-head:hover {
  color: var(--red);
}

.chat-head img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 999px;
}

.chat-head h3 {
  margin: 0;
  font-size: 1rem;
}

.chat-head span {
  color: var(--gray);
  font-size: 0.82rem;
}

#message-input {
  resize: vertical;
}

#message-input:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.empty-state {
  margin: 12px 0;
  padding: 14px;
  color: var(--gray);
  background: var(--off-white);
  border: 1px dashed var(--border);
  border-radius: 8px;
}

.account-warning-banner {
  position: relative;
  z-index: 19;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 5vw, 72px);
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(118, 12, 18, 0.98), rgba(215, 25, 32, 0.94)),
    var(--red);
  box-shadow: 0 14px 28px rgba(11, 11, 13, 0.18);
}

.account-warning-banner strong,
.account-warning-banner p {
  margin: 0;
}

.account-warning-banner p {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
}

.account-warning-banner span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.84rem;
}

.account-warning-banner .btn {
  flex: 0 0 auto;
  min-height: 38px;
  color: #111114;
  background: #ffffff;
}

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

.feature-card,
.info-card,
.post-card,
.calculator-card,
.wiki-note,
.profile-preview,
.profile-form,
.editor-form {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--black);
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(11, 11, 13, 0.06);
}

.feature-card,
.info-card,
.post-card,
.calculator-card,
.calculator-link-card,
.calc-category,
.wiki-note,
.profile-preview,
.profile-form,
.editor-form,
.social-panel,
.calculator-info-block,
.result {
  overflow-wrap: anywhere;
}

.feature-card,
.category-card,
.post-card {
  padding: 24px;
}

.feature-card span,
.card-number,
.post-card span {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 800;
}

.feature-card h3,
.info-card h3,
.post-card h3,
.calculator-card h3 {
  margin: 0 0 10px;
  font-size: 1.18rem;
  line-height: 1.25;
}

.feature-card p,
.info-card p,
.post-card p {
  margin: 0;
  color: var(--gray);
}

.category-card {
  min-height: 220px;
  text-align: left;
  cursor: pointer;
}

.feature-card:hover,
.category-card:hover,
.category-card.is-active,
.post-card:hover {
  border-color: var(--red);
  box-shadow: 0 16px 36px rgba(215, 25, 32, 0.15);
  transform: translateY(-3px);
}

.post-card {
  display: block;
}

.post-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: -4px 0 18px;
  border-radius: 8px;
}

.post-cover-placeholder,
.link-result-placeholder {
  display: grid;
  place-items: center;
  color: var(--red);
  background:
    linear-gradient(135deg, rgba(215, 25, 32, 0.08), rgba(11, 11, 13, 0.04)),
    var(--off-white);
  border: 1px dashed var(--border);
  font-weight: 900;
}

.post-cover-placeholder span {
  margin: 0;
  color: var(--red);
  font-size: 0.9rem;
}

.post-card.is-hidden,
.calculator-card.is-hidden,
.calculator-link-card.is-hidden {
  display: none;
}

.my-posts-grid {
  display: grid;
  gap: 16px;
}

.my-post-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  color: var(--black);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(11, 11, 13, 0.06);
}

.my-post-card h3 {
  margin: 6px 0 8px;
  font-size: 1.3rem;
}

.my-post-card p {
  margin: 0;
  color: var(--gray);
}

.my-post-card small {
  display: block;
  margin-top: 10px;
  color: var(--gray);
  font-weight: 700;
}

.my-post-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
}

.my-post-status.draft {
  background: #5b5f6a;
}

.my-post-status.pending {
  background: #a16207;
}

.my-post-status.approved {
  background: #15803d;
}

.calculator-category-grid {
  margin-top: -28px;
}

.calc-category {
  min-width: 0;
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--black);
  background: var(--panel);
  cursor: pointer;
  text-align: left;
}

.calc-category span {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
}

.calc-category small {
  color: var(--gray);
  font-weight: 700;
}

.calc-category:hover,
.calc-category.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), #111114);
  border-color: var(--red);
}

.calc-category:hover small,
.calc-category.is-active small {
  color: #f5d4d4;
}

.calculator-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.calculator-tool-card {
  gap: clamp(20px, 3vw, 30px);
  padding: clamp(18px, 3vw, 28px);
  overflow: visible;
  background:
    var(--calc-tool-sheen, linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58))),
    var(--calc-tool-bg, #ffffff);
  border: 1px solid var(--calc-panel-border, rgba(12, 13, 18, 0.1));
  border-radius: 8px;
  box-shadow: var(--calc-panel-shadow, 0 24px 70px rgba(15, 23, 42, 0.1));
  backdrop-filter: blur(18px);
}

.calculator-tool-card::before {
  content: none;
}

.calculator-tool-card.is-auto-calculating .btn[id$="-button"] {
  display: none;
}

.calculator-tool-title {
  display: none;
}

.calc-control {
  display: grid;
  gap: 12px;
}

.calc-control > label {
  color: var(--calc-text, #030712);
  font-size: 0.88rem;
  font-weight: 850;
  letter-spacing: 0.01em;
}

.calc-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(88px, auto);
  gap: 14px;
  align-items: center;
}

.calc-field:has(.calc-number-input) {
  display: none;
}

.calculator-tool-card input,
.calculator-tool-card select {
  min-height: 52px;
  color: var(--calc-text, #030712);
  background: var(--calc-field-bg, #ffffff);
  border: 1px solid var(--calc-field-border, #d9d9dd);
  border-radius: 8px;
  font-weight: 800;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.calculator-tool-card input:focus,
.calculator-tool-card select:focus {
  border-color: rgba(215, 25, 32, 0.75);
  box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.13);
}

.calc-number-input {
  display: none;
}

.calc-range-wrap {
  position: relative;
  grid-column: 1 / -1;
  padding-top: 38px;
}

.calc-value-box {
  position: absolute;
  top: 0;
  left: var(--range-progress, 0%);
  min-width: 78px;
  min-height: 38px;
  padding: 6px 10px;
  color: var(--calc-value-text, #ffffff);
  background:
    linear-gradient(135deg, rgba(215, 25, 32, 0.95), rgba(22, 24, 32, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(215, 25, 32, 0.18);
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1.2;
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transform: translateX(var(--bubble-offset, -50%)) translateZ(0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition:
    left 0.12s linear,
    transform 0.16s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.16s ease;
}

.calculator-tool-card .calc-value-input {
  width: clamp(34px, 7ch, 72px);
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: right;
  outline: none;
  appearance: textfield;
}

.calculator-tool-card .calc-value-input::-webkit-outer-spin-button,
.calculator-tool-card .calc-value-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.calc-value-unit {
  color: inherit;
  font: inherit;
  opacity: 0.92;
}

.calc-control:focus-within .calc-value-box {
  transform: translateX(var(--bubble-offset, -50%)) translateY(-1px);
  box-shadow: 0 18px 34px rgba(215, 25, 32, 0.25);
}

.calc-range {
  width: 100%;
  height: 24px;
  padding: 0;
  accent-color: var(--red);
  background: transparent;
  border: 0;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.calc-range::-webkit-slider-runnable-track {
  height: 10px;
  background:
    linear-gradient(90deg, var(--red) 0 var(--range-progress, 0%), var(--calc-track, #e3e3e3) var(--range-progress, 0%) 100%);
  border: 1px solid var(--calc-track-border, rgba(12, 13, 18, 0.08));
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(12, 13, 18, 0.1);
}

.calc-range::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  margin-top: -8px;
  background: var(--calc-thumb, #ffffff);
  border: 3px solid var(--red);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(11, 11, 13, 0.24);
  -webkit-appearance: none;
  appearance: none;
  transition:
    transform 0.14s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.14s ease;
}

.calc-range:active::-webkit-slider-thumb {
  transform: scale(1.12);
  box-shadow: 0 12px 26px rgba(215, 25, 32, 0.28);
}

.calc-range::-moz-range-track {
  height: 10px;
  background: var(--calc-track, #e3e3e3);
  border: 1px solid var(--calc-track-border, rgba(12, 13, 18, 0.08));
  border-radius: 999px;
}

.calc-range::-moz-range-progress {
  height: 10px;
  background: var(--red);
  border-radius: 999px;
}

.calc-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--calc-thumb, #ffffff);
  border: 3px solid var(--red);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(11, 11, 13, 0.24);
  transition:
    transform 0.14s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.14s ease;
}

.calc-range:active::-moz-range-thumb {
  transform: scale(1.12);
  box-shadow: 0 12px 26px rgba(215, 25, 32, 0.28);
}

.calc-range-meta {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  margin-top: -4px;
  color: var(--calc-muted, #4b5563);
  font-size: 0.78rem;
  font-weight: 750;
}

.calc-select {
  grid-column: 1 / -1;
}

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

.calc-time-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(72px, auto);
  gap: 10px;
  align-items: center;
}

.calc-time-field label {
  grid-column: 1 / -1;
}

.parq-quiz {
  display: grid;
  gap: 16px;
}

.parq-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--calc-muted, #4b5563);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.parq-progress strong {
  color: var(--red);
}

.parq-progress-track {
  height: 10px;
  overflow: hidden;
  background: var(--calc-track, #e3e3e3);
  border: 1px solid var(--calc-track-border, rgba(15, 23, 42, 0.08));
  border-radius: 999px;
}

.parq-progress-track span {
  display: block;
  width: 14%;
  height: 100%;
  background: linear-gradient(90deg, var(--red), #ff5960);
  border-radius: inherit;
  transition: width 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.parq-question-card {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 24px);
  color: var(--calc-text, #030712);
  background: rgba(215, 25, 32, 0.07);
  border: 1px solid rgba(215, 25, 32, 0.22);
  border-radius: 8px;
}

.parq-question {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  font-weight: 850;
  line-height: 1.42;
}

.parq-followup-label {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.parq-back {
  width: fit-content;
  min-height: 40px;
  padding: 8px 12px;
}

.parq-back:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.parq-choice {
  min-height: 48px;
  border: 1px solid var(--calc-panel-border, rgba(15, 23, 42, 0.1));
  border-radius: 8px;
  color: var(--calc-text, #030712);
  background: var(--calc-field-bg, #ffffff);
  box-shadow: none;
  transition:
    transform 0.16s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.16s ease,
    background-color 0.16s ease;
}

.parq-choice:hover {
  border-color: rgba(215, 25, 32, 0.45);
  transform: translateY(-1px);
}

.parq-choice[data-parq-answer="yes"]:hover {
  color: #ffffff;
  background: var(--red);
}

.parq-choice[data-parq-answer="no"]:hover {
  color: #ffffff;
  background: #15803d;
}

.parq-quiz.is-complete .parq-choice {
  opacity: 0.44;
  pointer-events: none;
}

.parq-answers {
  display: flex;
  min-height: 34px;
  flex-wrap: wrap;
  gap: 8px;
}

.parq-answer-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  color: var(--calc-text, #030712);
  background: var(--calc-field-bg, #ffffff);
  font-size: 0.8rem;
  font-weight: 850;
}

.parq-answer-pill.is-yes {
  border-color: rgba(215, 25, 32, 0.34);
  color: #9c1118;
  background: rgba(215, 25, 32, 0.09);
}

.parq-answer-pill.is-no {
  border-color: rgba(20, 140, 80, 0.3);
  color: #0d5f38;
  background: rgba(20, 140, 80, 0.1);
}

.parq-reset {
  width: fit-content;
}

.calculator-tool-card .btn-primary {
  width: min(100%, 300px);
  margin-top: 2px;
  border-radius: 4px;
  box-shadow: none;
}

.calculator-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--red);
}

.calculator-card.calculator-tool-card::before {
  content: none;
}

.time-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
}

.time-input-row.calc-time-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.calculator-directory {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  transition:
    opacity 0.24s ease,
    transform 0.24s ease;
}

.calculator-directory.is-switching {
  opacity: 0.86;
  transform: translateY(6px);
}

.calculator-link-card {
  position: relative;
  min-width: 0;
  min-height: 178px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 22px;
  color: var(--black);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.calculator-card-cover {
  width: calc(100% + 44px);
  height: 138px;
  object-fit: cover;
  margin: -22px -22px 8px;
  border-radius: 8px 8px 0 0;
  filter: saturate(1.05);
}

.calculator-link-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--red);
}

.calculator-link-card:hover {
  transform: translateY(-3px);
  border-color: var(--red);
  box-shadow: var(--shadow);
}

.calculator-link-card.calc-card-enter,
.calculator-card.calc-card-enter {
  animation: calculatorCardEnter 0.48s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: var(--calc-enter-delay, 0ms);
}

@keyframes calculatorCardEnter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    filter: blur(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.calculator-link-card span {
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.calculator-link-card strong {
  font-size: 1.1rem;
  line-height: 1.25;
}

.calculator-link-card p {
  margin: 0;
  color: var(--gray);
  font-size: 0.95rem;
}

.calculator-detail-section {
  background: var(--calc-page-bg, #f4f4f4);
}

body.calculator-detail-page,
body:has(#calculator-detail-root) {
  --calc-page-bg:
    radial-gradient(circle at 12% 8%, rgba(215, 25, 32, 0.1), transparent 32vw),
    radial-gradient(circle at 88% 18%, rgba(22, 163, 124, 0.08), transparent 28vw),
    #f5f6f8;
  --calc-text: #030712;
  --calc-muted: #4b5563;
  --calc-field-bg: #ffffff;
  --calc-field-border: #d9d9dd;
  --calc-panel-bg: rgba(255, 255, 255, 0.78);
  --calc-panel-border: rgba(15, 23, 42, 0.1);
  --calc-panel-shadow: 0 24px 70px rgba(15, 23, 42, 0.1);
  --calc-tool-bg: #ffffff;
  --calc-tool-sheen: linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.6));
  --calc-value-bg: #e9e9ea;
  --calc-value-text: #ffffff;
  --calc-track: #e3e3e3;
  --calc-track-border: rgba(15, 23, 42, 0.08);
  --calc-thumb: #ffffff;
  --calc-divider: #c9c9c9;
  background: var(--calc-page-bg);
}

body.dark-mode.calculator-detail-page,
body.dark-mode:has(#calculator-detail-root) {
  --calc-page-bg:
    radial-gradient(circle at 14% 8%, rgba(215, 25, 32, 0.18), transparent 30vw),
    radial-gradient(circle at 88% 12%, rgba(20, 140, 80, 0.12), transparent 28vw),
    #07080a;
  --calc-text: #f7f7f8;
  --calc-muted: #b5b5bd;
  --calc-field-bg: rgba(20, 21, 27, 0.84);
  --calc-field-border: rgba(255, 255, 255, 0.13);
  --calc-panel-bg: rgba(16, 17, 23, 0.74);
  --calc-panel-border: rgba(255, 255, 255, 0.1);
  --calc-panel-shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
  --calc-tool-bg: rgba(15, 16, 22, 0.8);
  --calc-tool-sheen: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
  --calc-value-bg: #222329;
  --calc-value-text: #ffffff;
  --calc-track: #2f3037;
  --calc-track-border: rgba(255, 255, 255, 0.08);
  --calc-thumb: #f7f7f8;
  --calc-divider: #363740;
}

body.calculator-detail-page main,
body:has(#calculator-detail-root) main {
  background: var(--calc-page-bg);
}

body.calculator-detail-page .page-hero,
body:has(#calculator-detail-root) .page-hero {
  width: min(1120px, calc(100% - 32px));
  padding-top: clamp(40px, 7vw, 70px);
  padding-bottom: clamp(24px, 4vw, 36px);
  color: var(--calc-text);
}

body.calculator-detail-page .page-hero h1,
body:has(#calculator-detail-root) .page-hero h1 {
  max-width: 780px;
  margin: 8px 0 8px;
  color: var(--calc-text);
  font-size: clamp(2.15rem, 5vw, 3.3rem);
  line-height: 1.02;
}

body.calculator-detail-page .page-hero p:not(.eyebrow),
body:has(#calculator-detail-root) .page-hero p:not(.eyebrow) {
  max-width: 560px;
  color: var(--calc-text);
  font-weight: 800;
}

.calculator-detail-layout {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(340px, 0.78fr);
  gap: clamp(26px, 4vw, 48px);
  align-items: start;
}

.calculator-reading-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 28px;
  margin-top: clamp(10px, 2vw, 26px);
  padding-top: clamp(24px, 4vw, 42px);
  border-top: 1px solid var(--calc-divider, #c9c9c9);
}

.calculator-detail-form {
  background: transparent;
}

.calculator-info-panel {
  display: grid;
  gap: 16px;
}

.calculator-info-block {
  padding: clamp(18px, 2.5vw, 24px);
  color: var(--calc-text, #030712);
  background: var(--calc-panel-bg, rgba(255, 255, 255, 0.78));
  border: 1px solid var(--calc-panel-border, rgba(15, 23, 42, 0.1));
  border-radius: 8px;
  box-shadow: var(--calc-panel-shadow, 0 24px 70px rgba(15, 23, 42, 0.1));
  backdrop-filter: blur(18px);
}

.calculator-info-block h2 {
  margin: 0 0 14px;
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.calculator-info-block h3 {
  margin: 16px 0 8px;
  color: var(--calc-text, #030712);
  font-size: 1.02rem;
  line-height: 1.2;
}

.calculator-info-block p {
  margin: 0;
  color: var(--calc-muted, #4b5563);
  line-height: 1.5;
}

.calculator-reading-panel .calculator-info-block p {
  max-width: 980px;
  margin: 0 0 18px;
  color: var(--calc-text, #030712);
  font-size: clamp(1rem, 1.5vw, 1.08rem);
  line-height: 1.78;
}

.calculator-reading-panel .calculator-info-block p:last-child {
  margin-bottom: 0;
}

.calculator-info-block:not(.calculator-result-card) {
  padding-top: clamp(18px, 2.5vw, 24px);
}

.calculator-reading-panel .calculator-info-block {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.calculator-sources-wide {
  padding-top: 26px;
  border-top: 1px solid var(--calc-divider, #c9c9c9);
}

.calculator-result-card {
  min-height: 190px;
  background:
    linear-gradient(145deg, rgba(215, 25, 32, 0.12), transparent 52%),
    var(--calc-panel-bg, rgba(255, 255, 255, 0.78));
  position: sticky;
  top: 92px;
}

.calculator-result-card .eyebrow {
  margin-bottom: 8px;
  color: var(--calc-text, #030712);
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.calculator-result-card h2 {
  margin-bottom: 20px;
  color: var(--calc-muted, #4b5563);
  font-size: clamp(0.98rem, 1.6vw, 1.14rem);
  line-height: 1.25;
}

.calculator-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -4px 0 18px;
}

.calculator-pdf-button {
  width: fit-content;
  min-height: 40px;
  margin: 0;
  padding: 9px 13px;
  border-radius: 8px;
}

.calculator-excel-button {
  border-color: rgba(11, 122, 72, 0.28);
  color: #0b7a48;
}

.comprehensive-suite-teaser {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 30px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(215, 25, 32, 0.16), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 248, 250, 0.92));
  border: 1px solid rgba(215, 25, 32, 0.12);
  box-shadow: 0 24px 48px rgba(16, 17, 20, 0.08);
}

.comprehensive-suite-teaser h2 {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
}

.comprehensive-suite-teaser p:last-child {
  margin-bottom: 0;
}

.comprehensive-suite-builder {
  display: grid;
  gap: 22px;
}

.comprehensive-suite-card {
  padding: 22px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.08);
}

.comprehensive-suite-card h2,
.comprehensive-suite-card h3 {
  margin-bottom: 10px;
}

.comprehensive-category-chips,
.comprehensive-test-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.comprehensive-category-chip,
.comprehensive-test-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(248, 250, 252, 0.9);
  color: #0f172a;
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.comprehensive-category-chip:hover,
.comprehensive-test-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(215, 25, 32, 0.32);
  box-shadow: 0 12px 24px rgba(215, 25, 32, 0.1);
}

.comprehensive-category-chip.is-active,
.comprehensive-test-chip.is-selected {
  background: linear-gradient(135deg, #d71920, #ef4444);
  border-color: transparent;
  color: #ffffff;
}

.comprehensive-tests-panel {
  display: grid;
  gap: 12px;
  overflow: hidden;
  opacity: 0;
  max-height: 0;
  transform: translateY(-10px);
  transition: max-height 280ms ease, opacity 240ms ease, transform 240ms ease;
}

.comprehensive-tests-panel.is-visible {
  opacity: 1;
  max-height: 920px;
  transform: translateY(0);
}

.comprehensive-tests-panel > p {
  margin: 0;
  color: #475569;
}

.comprehensive-selection-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.comprehensive-selection-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.comprehensive-selection-badge {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
  font-weight: 700;
}

.comprehensive-results-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.comprehensive-result-item {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.comprehensive-result-delete {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(215, 25, 32, 0.22);
  background: rgba(255, 255, 255, 0.94);
  color: #d71920;
  font-size: 0.76rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
  transform: translateY(-2px);
}

.comprehensive-result-item:hover .comprehensive-result-delete,
.comprehensive-result-item:focus-within .comprehensive-result-delete {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.comprehensive-result-item strong {
  color: #111827;
  font-size: 0.98rem;
  padding-right: 56px;
}

.comprehensive-result-item span {
  color: #475569;
  font-size: 0.93rem;
  line-height: 1.45;
}

.comprehensive-result-item.is-empty {
  color: #64748b;
  text-align: left;
}

.comprehensive-export-note {
  color: #475569;
  font-size: 0.96rem;
}

.comprehensive-selected-tests {
  display: grid;
  gap: 18px;
}

.comprehensive-test-card {
  padding: 22px;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(215, 25, 32, 0.08), transparent 45%),
    rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.comprehensive-test-card-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.comprehensive-test-card-header p {
  margin: 0;
  color: #475569;
}

.comprehensive-test-card .calculator-tool-title {
  margin-bottom: 18px;
}

.comprehensive-test-card .result {
  margin-top: 18px;
}

.comprehensive-card-actions {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.comprehensive-card-actions p {
  margin: 0;
  color: #5b6472;
  font-size: 0.96rem;
}

.comprehensive-test-remove {
  padding: 9px 12px;
}

.comprehensive-inline-info {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.comprehensive-inline-info h4 {
  margin-bottom: 8px;
}

.comprehensive-inline-info ul {
  margin: 0;
  padding-left: 18px;
}

.comprehensive-inline-info li + li {
  margin-top: 6px;
}

.comprehensive-empty-state {
  padding: 28px;
  border-radius: 22px;
  border: 1px dashed rgba(148, 163, 184, 0.42);
  background: rgba(248, 250, 252, 0.72);
  color: #475569;
  text-align: center;
}

body.dark-mode .comprehensive-suite-card {
  background: linear-gradient(180deg, rgba(17, 18, 24, 0.94), rgba(9, 10, 14, 0.9));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.32);
}

body.dark-mode .comprehensive-suite-card h2,
body.dark-mode .comprehensive-suite-card h3,
body.dark-mode .comprehensive-tests-panel > p,
body.dark-mode .comprehensive-export-note,
body.dark-mode .comprehensive-test-card-header p,
body.dark-mode .comprehensive-card-actions p,
body.dark-mode .comprehensive-empty-state,
body.dark-mode .comprehensive-inline-info li,
body.dark-mode .comprehensive-inline-info strong,
body.dark-mode #comprehensive-suite-summary {
  color: #d5d9e3;
}

body.dark-mode .comprehensive-category-chip,
body.dark-mode .comprehensive-test-chip,
body.dark-mode .comprehensive-selection-badge {
  background: rgba(19, 22, 30, 0.96);
  color: #f7f7f8;
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .comprehensive-result-item {
  background: rgba(17, 20, 28, 0.88);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .comprehensive-result-delete {
  background: rgba(15, 18, 26, 0.94);
  border-color: rgba(239, 68, 68, 0.34);
  color: #f87171;
}

body.dark-mode .comprehensive-result-item strong {
  color: #f8fafc;
}

body.dark-mode .comprehensive-result-item span,
body.dark-mode .comprehensive-result-item.is-empty {
  color: #cbd5e1;
}

body.dark-mode .comprehensive-category-chip.is-active,
body.dark-mode .comprehensive-test-chip.is-selected {
  background: linear-gradient(135deg, #d71920, #ef4444);
  color: #ffffff;
}

body.dark-mode .comprehensive-test-card {
  background:
    linear-gradient(145deg, rgba(215, 25, 32, 0.12), transparent 48%),
    rgba(12, 13, 18, 0.94);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .comprehensive-inline-info {
  background: rgba(17, 20, 28, 0.88);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .comprehensive-card-actions {
  border-top-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .comprehensive-empty-state {
  background: rgba(15, 18, 26, 0.88);
  border-color: rgba(255, 255, 255, 0.14);
}

@media (max-width: 820px) {
  .comprehensive-suite-teaser {
    grid-template-columns: 1fr;
  }

  .comprehensive-selection-meta,
  .comprehensive-test-card-header {
    flex-direction: column;
    align-items: stretch;
  }

  .calculator-export-actions {
    width: 100%;
  }

  .calculator-export-actions .btn {
    flex: 1 1 180px;
  }
}

.calculator-source-list {
  margin: 0;
  padding-left: 20px;
}

.calculator-sources-wide .calculator-source-list {
  columns: 2;
  column-gap: 34px;
}

.calculator-source-list li {
  margin-bottom: 8px;
  break-inside: avoid;
}

.calculator-source-list a {
  color: var(--red);
  font-weight: 800;
}

label {
  color: var(--black);
  font-size: 0.9rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--black);
  background: var(--white);
  border: 1px solid #d7d7dc;
  border-radius: 8px;
  outline: none;
}

textarea {
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.hidden-file-input {
  display: none;
}

.editor-content-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: space-between;
}

.editor-content-header label {
  margin: 0;
}

.editor-content-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.editor-content-tool {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(215, 25, 32, 0.24);
  border-radius: 8px;
  color: var(--red);
  background: rgba(215, 25, 32, 0.07);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.1;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.editor-content-tool:hover,
.editor-content-tool:focus-visible {
  color: #ffffff;
  background: var(--red);
  border-color: var(--red);
  transform: translateY(-1px);
}

.editor-content-tool:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.wiki-canvas {
  position: relative;
  min-height: clamp(560px, 62vh, 880px);
  max-width: 100%;
  overflow-x: hidden;
  padding: clamp(20px, 3vw, 34px);
  color: #111114;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  line-height: 1.78;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wiki-canvas p,
.wiki-canvas li,
.wiki-canvas td,
.wiki-canvas th,
.wiki-canvas figcaption {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.editor-references {
  padding: 20px 26px;
  color: #111114;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.editor-references:empty {
  display: none;
}

.editor-inline-references {
  margin-top: 32px;
  padding-top: 18px;
}

.editor-inline-references .references {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.editor-inline-references .references h2 {
  color: #111114;
}

.wiki-canvas .editor-inline-references,
.wiki-canvas .editor-inline-references .references,
.wiki-canvas .editor-inline-references .references h2,
.wiki-canvas .editor-inline-references .references li,
.wiki-canvas .editor-inline-references .references li::marker {
  color: #111114;
}

.wiki-canvas .editor-inline-references .references h2 {
  border-bottom-color: #a2a9b1;
}

body.dark-mode .wiki-canvas .editor-inline-references,
body.dark-mode .wiki-canvas .editor-inline-references .references,
body.dark-mode .wiki-canvas .editor-inline-references .references h2,
body.dark-mode .wiki-canvas .editor-inline-references .references li,
body.dark-mode .wiki-canvas .editor-inline-references .references li::marker {
  color: #111114;
}

.citation-marker {
  display: inline;
  width: 0;
  height: 0;
  overflow: hidden;
}

.wiki-canvas:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.12);
}

.wiki-canvas h1,
.wiki-canvas h2,
.wiki-canvas h3,
.wiki-canvas h4,
.wiki-canvas h5,
.wiki-canvas h6 {
  margin: 24px 0 10px;
  line-height: 1.15;
}

.wiki-canvas h1 {
  font-size: 2.3rem;
}

.wiki-canvas h2 {
  font-size: 1.9rem;
}

.wiki-canvas hr,
.article-body hr {
  margin: 28px 0;
  border: 0;
  border-top: 1px solid #a2a9b1;
}

.wiki-canvas h3 {
  font-size: 1.55rem;
}

.wiki-canvas h4 {
  font-size: 1.25rem;
}

.wiki-canvas h5 {
  font-size: 1.08rem;
}

.wiki-canvas h6 {
  font-size: 0.98rem;
  text-transform: uppercase;
}

.wiki-canvas a,
.article-body a {
  color: #d71920;
  text-decoration: none;
}

.wiki-canvas a:hover,
.article-body a:hover {
  text-decoration: underline;
}

.wiki-canvas blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  color: #54595d;
  background: #f8f9fa;
  border-left: 4px solid var(--red);
  border-radius: 8px;
}

.wiki-canvas code,
.article-body code {
  padding: 2px 5px;
  color: #111114;
  background: #eaecf0;
  border-radius: 4px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92em;
}

.wiki-canvas pre {
  overflow-x: auto;
  padding: 14px;
  color: #ffffff;
  background: #111114;
  border-radius: 8px;
}

.wiki-canvas pre code,
.article-body pre code {
  padding: 0;
  color: inherit;
  background: transparent;
  border-radius: 0;
}

.wiki-canvas img {
  max-width: 100%;
  border-radius: 8px;
}

.wiki-canvas figure,
.article-body figure {
  margin: 20px 0;
}

.wiki-media {
  width: min(320px, 100%);
  min-width: 120px;
  max-width: min(100%, 900px);
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.wiki-media.align-center {
  margin-left: auto;
  margin-right: auto;
}

.wiki-media.align-left {
  float: left;
  max-width: min(42%, 320px);
  margin: 4px 18px 14px 0;
}

.wiki-media.align-right {
  float: right;
  max-width: min(42%, 320px);
  margin: 4px 0 14px 18px;
}

.wiki-media.align-wide {
  width: 100%;
  max-width: 100%;
}

.wiki-canvas .wiki-media.align-free,
.article-body .wiki-media.align-free {
  position: absolute;
  left: 24px;
  top: 140px;
  float: none;
  max-width: min(100%, 900px);
  margin: 0;
  z-index: 3;
  cursor: move;
}

.wiki-canvas .wiki-media.align-free img {
  cursor: move;
}

.wiki-media img,
.wiki-canvas .wiki-media img,
.article-body .wiki-media img {
  width: 100%;
  max-width: 100%;
  margin: 0;
  border: 0;
  border-radius: var(--media-radius, 8px);
  box-sizing: border-box;
  cursor: zoom-in;
}

.wiki-media.has-border img {
  border: var(--media-border-width, 2px) solid #111111;
}

.wiki-canvas .wiki-media {
  position: relative;
  cursor: pointer;
  overflow: visible;
  resize: none;
  box-sizing: border-box;
  max-width: 100%;
}

.wiki-canvas .wiki-media[draggable="true"] img {
  cursor: grab;
}

.wiki-canvas .wiki-media.is-dragging {
  opacity: 0.45;
}

.wiki-canvas .wiki-media.is-selected {
  resize: none;
}

.wiki-canvas .wiki-media.align-wide.is-selected {
  resize: none;
}

.wiki-canvas .wiki-table.is-selected,
.wiki-canvas .wiki-template-block.is-selected,
.wiki-canvas .wiki-comment-block.is-selected,
.wiki-canvas .wiki-map-block.is-selected,
.wiki-canvas .article-anatomy-embed.is-selected,
.wiki-canvas .wiki-anatomy-card.is-selected,
.wiki-canvas .wiki-symbol-line.is-selected,
.wiki-canvas sup[data-ref-id].is-selected,
.wiki-canvas hr.is-selected {
  outline: 3px solid rgba(215, 25, 32, 0.42);
  box-shadow: 0 0 0 5px rgba(215, 25, 32, 0.12);
}

.wiki-canvas .wiki-table,
.wiki-canvas .wiki-template-block,
.wiki-canvas .wiki-comment-block,
.wiki-canvas .wiki-map-block,
.wiki-canvas .article-anatomy-embed,
.wiki-canvas .wiki-anatomy-card,
.wiki-canvas .wiki-symbol-line,
.wiki-canvas hr {
  cursor: pointer;
}

.wiki-canvas figcaption,
.article-body figcaption {
  color: var(--gray);
  font-size: 0.9rem;
  text-align: center;
}

.wiki-media figcaption {
  min-height: 36px;
  margin-top: 10px;
  padding: 8px 10px;
  color: var(--gray);
  background: rgba(255, 255, 255, 0.78);
  border: 1px dashed var(--border);
  border-radius: 8px;
  font-size: 0.86rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wiki-canvas .wiki-media figcaption {
  cursor: text;
}

.wiki-canvas .wiki-media figcaption:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  font-style: italic;
}

.wiki-media figcaption:focus {
  outline: 2px solid rgba(215, 25, 32, 0.26);
  outline-offset: 2px;
  border-color: rgba(215, 25, 32, 0.36);
}

.wiki-media figcaption small {
  display: block;
  margin-top: 4px;
  color: var(--gray);
}

.wiki-template-block,
.wiki-comment-block,
.wiki-formula,
.wiki-map-block,
.wiki-chart-block,
.wiki-music-block {
  margin: 18px 0;
  padding: 14px 16px;
  background: #f8f9fa;
  border: 1px solid #a2a9b1;
  border-left: 4px solid var(--red);
  border-radius: 8px;
}

.wiki-comment-block {
  border-left-color: #6f7278;
}

.wiki-formula {
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}

.wiki-map-block {
  min-height: 150px;
  display: grid;
  align-content: center;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(162, 169, 177, 0.22) 1px, transparent 1px),
    linear-gradient(rgba(162, 169, 177, 0.22) 1px, transparent 1px),
    #f8f9fa;
  background-size: 28px 28px;
}

.wiki-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.wiki-gallery-item {
  margin: 0;
  padding: 8px;
  background: #f8f9fa;
  border: 1px solid #a2a9b1;
}

.wiki-gallery-placeholder {
  display: grid;
  min-height: 96px;
  place-items: center;
  color: #6f7278;
  background: #eaecf0;
  font-weight: 800;
}

.wiki-chart-bars {
  display: grid;
  gap: 8px;
}

.wiki-chart-bars div {
  min-height: 28px;
  padding: 4px 8px;
  color: #ffffff;
  background: var(--red);
  font-weight: 800;
}

.wiki-chart-bars div:nth-child(2) {
  width: 72%;
  background: #4f5bd5;
}

.wiki-chart-bars div:nth-child(3) {
  width: 48%;
  background: #0f766e;
}

body.dark-mode .article-body .wiki-template-block,
body.dark-mode .article-body .wiki-comment-block,
body.dark-mode .article-body .wiki-formula,
body.dark-mode .article-body .wiki-map-block,
body.dark-mode .article-body .wiki-chart-block,
body.dark-mode .article-body .wiki-music-block,
body.dark-mode .article-body .wiki-gallery-item {
  color: #f4f4f5;
  background: #18181d;
  border-color: #5b5d66;
}

body.dark-mode .article-body code {
  color: #f4f4f5;
  background: #22232a;
}

body.dark-mode .article-body .wiki-gallery-placeholder {
  color: #d8d8de;
  background: #22232a;
}

.wiki-canvas table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
}

.wiki-table {
  overflow-x: auto;
  padding: 0;
}

.wiki-table caption {
  padding: 8px;
  color: var(--black);
  background: var(--off-white);
  border: 1px solid #a2a9b1;
  border-bottom: 0;
  font-weight: 800;
  text-align: center;
}

.wiki-canvas th,
.wiki-canvas td {
  padding: 10px;
  border: 1px solid #a2a9b1;
  text-align: left;
}

.wiki-canvas th {
  background: #eaecf0;
}

.wiki-canvas sup,
.article-body sup {
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.75em;
}

.wiki-canvas sup.citation,
.wiki-canvas sup.citation a {
  pointer-events: none;
  user-select: none;
}

.term-link {
  position: relative;
  color: var(--red);
  font-weight: 700;
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  font-weight: 800;
  text-decoration: none;
}

.download-link::before {
  content: "PDF";
  padding: 1px 5px;
  color: #ffffff;
  background: var(--red);
  border-radius: 4px;
  font-size: 0.68em;
  line-height: 1.4;
}

.download-link:hover {
  text-decoration: underline;
}

.term-link:hover .link-popover {
  display: block;
}

.link-popover {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 12;
  display: none;
  width: min(330px, 80vw);
  padding: 0;
  color: #202124;
  background: #ffffff;
  border: 1px solid #c8ccd1;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.link-popover img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
}

.link-popover .link-popover-text {
  display: block;
  padding: 12px;
  color: #202124;
  font-size: 0.92rem;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.12);
}

.result {
  min-height: 52px;
  margin: 8px 0 0;
  padding: 12px;
  color: var(--black);
  background: rgba(215, 25, 32, 0.1);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  font-weight: 700;
}

.calculator-result-card .result {
  min-height: 0;
  margin: 0;
  padding: 0;
  color: var(--calc-text, #030712);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 1rem;
  font-weight: 700;
  will-change: transform, opacity;
}

.calculator-result-card .result.is-updating {
  animation: calculator-result-update 220ms ease-out;
}

.calculator-result-card .result strong,
.calculator-result-card .result .calc-result-value {
  color: var(--calc-text, #030712);
  font-size: clamp(1.9rem, 4vw, 2.85rem);
  line-height: 0.98;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.calculator-result-card .result strong {
  display: block;
  margin-top: 3px;
}

.calc-result-label {
  display: block;
  margin-bottom: 8px;
  color: var(--calc-muted, #4b5563);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.calc-result-assessment {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 14px;
  padding: 9px 11px;
  border: 1px solid rgba(215, 25, 32, 0.26);
  border-radius: 8px;
  color: var(--calc-text, #030712);
  background: rgba(215, 25, 32, 0.08);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.45;
}

.calc-result-assessment.is-good {
  border-color: rgba(20, 140, 80, 0.28);
  color: #0d5f38;
  background: rgba(20, 140, 80, 0.1);
}

.calc-result-assessment.is-mid {
  border-color: rgba(177, 111, 0, 0.32);
  color: #7a4b00;
  background: rgba(177, 111, 0, 0.12);
}

.calc-result-assessment.is-bad {
  border-color: rgba(215, 25, 32, 0.3);
  color: #9c1118;
  background: rgba(215, 25, 32, 0.1);
}

@keyframes calculator-result-update {
  0% {
    opacity: 0.68;
    transform: translateY(3px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-rich {
  overflow-x: auto;
}

.calc-result-table {
  width: 100%;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--calc-panel-border, rgba(15, 23, 42, 0.1));
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
}

.calc-result-table th,
.calc-result-table td {
  padding: 10px;
  border: 0;
  border-bottom: 1px solid var(--calc-panel-border, rgba(15, 23, 42, 0.1));
  text-align: left;
  vertical-align: top;
}

.calc-result-table tr:last-child th,
.calc-result-table tr:last-child td {
  border-bottom: 0;
}

.calc-result-table th {
  color: var(--calc-text, #030712);
  background: rgba(215, 25, 32, 0.08);
}

.calc-note {
  margin: 2px 0 0;
  color: var(--gray);
  font-size: 0.88rem;
  line-height: 1.45;
}

.calculator-evidence {
  margin-top: 24px;
  padding: 22px;
  color: var(--black);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.calculator-evidence h3 {
  margin: 0 0 8px;
}

.calculator-evidence p {
  margin: 0 0 12px;
  color: var(--gray);
}

.calculator-evidence ul {
  margin: 0;
  padding-left: 20px;
}

.calculator-evidence a {
  color: var(--red);
  font-weight: 800;
}

.auth-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9998;
  display: none;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(12px, 4vw, 24px);
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.64);
}

.auth-modal.is-open {
  display: grid;
}

body.auth-lock {
  overflow: hidden;
  animation: none;
  transform: none;
}

body.mobile-menu-open {
  overflow: hidden;
}

.auth-box {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(430px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 28px;
  color: var(--black);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(245, 246, 248, 0.92)),
    var(--panel);
  border: 1px solid rgba(11, 11, 13, 0.08);
  border-radius: 28px;
  box-shadow: 0 28px 60px rgba(11, 11, 13, 0.18);
  transform: translate(-50%, -50%);
}

.auth-page-shell {
  width: min(1240px, calc(100% - 24px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 460px);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  min-height: calc(100vh - 180px);
  padding: clamp(32px, 6vw, 72px) 0;
}

.auth-page-copy {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid rgba(11, 11, 13, 0.08);
  border-radius: 32px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(246, 246, 247, 0.82)),
    var(--panel);
  box-shadow: 0 24px 56px rgba(11, 11, 13, 0.12);
}

.auth-page-copy::before {
  content: "";
  position: absolute;
  inset: auto -12% -24% auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 25, 32, 0.22), transparent 68%);
  pointer-events: none;
}

.auth-page-copy .eyebrow {
  margin-bottom: 10px;
}

.auth-page-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.auth-page-copy p {
  max-width: 58ch;
  color: var(--gray);
  font-size: 1.02rem;
}

.auth-page-points {
  display: grid;
  gap: 14px;
  margin: 28px 0 0;
}

.auth-page-points div {
  padding: 14px 16px;
  border: 1px solid rgba(215, 25, 32, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.auth-page-points strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.96rem;
}

.auth-page-points span {
  color: var(--gray);
  font-size: 0.95rem;
}

.auth-panel-wrap {
  position: relative;
  z-index: 1;
}

.auth-box.auth-box-standalone {
  position: relative;
  top: auto;
  left: auto;
  width: min(460px, 100%);
  max-height: none;
  overflow-y: visible;
  border-radius: 28px;
  border: 1px solid rgba(11, 11, 13, 0.08);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.95), rgba(245, 246, 248, 0.9)),
    var(--panel);
  box-shadow: 0 28px 60px rgba(11, 11, 13, 0.18);
  transform: none;
}

.close-modal {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: var(--red);
  cursor: pointer;
  font-size: 1.4rem;
}

.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 24px 0 18px;
  padding: 6px;
  border: 1px solid rgba(11, 11, 13, 0.08);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(11, 11, 13, 0.04), rgba(11, 11, 13, 0.02));
}

.auth-tabs::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  width: calc(50% - 10px);
  height: calc(100% - 12px);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 95, 102, 0.96), rgba(181, 15, 22, 0.92));
  box-shadow: 0 14px 26px rgba(215, 25, 32, 0.24);
  transform: translateX(0);
  transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.auth-box[data-auth-view="register"] .auth-tabs::before {
  transform: translateX(calc(100% + 8px));
}

.auth-tab {
  position: relative;
  z-index: 1;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  color: #5f6470;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
  transition: color 0.24s ease, transform 0.24s ease;
}

.auth-tab.is-active {
  color: #ffffff;
  transform: translateY(-1px);
}

.auth-panels {
  position: relative;
  display: grid;
}

.auth-form {
  display: grid;
  grid-area: 1 / 1;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  transform: translate3d(22px, 0, 0) scale(0.985);
  transform-origin: center;
  max-height: 0;
  transition:
    opacity 0.26s ease,
    transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1),
    max-height 0.34s ease,
    visibility 0s linear 0.34s;
}

.auth-form.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  max-height: 1200px;
  transition:
    opacity 0.26s ease,
    transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1),
    max-height 0.34s ease,
    visibility 0s linear 0s;
}

.auth-box[data-auth-view="register"] .auth-form {
  transform: translate3d(-22px, 0, 0) scale(0.985);
}

.auth-box[data-auth-view="register"] .auth-form.is-active {
  transform: translate3d(0, 0, 0) scale(1);
}

.auth-form h2 {
  margin: 0 0 8px;
  color: #111114;
  font-size: 1.55rem;
}

.auth-form label,
.consent-line {
  color: #202127;
}

.auth-form input {
  color: #111114;
  background: rgba(255, 255, 255, 0.9);
}

.auth-form input::placeholder {
  color: #8a8f98;
}

body.dark-mode .auth-page-copy {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(145deg, rgba(21, 21, 26, 0.92), rgba(11, 11, 14, 0.84)),
    var(--panel);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

body.dark-mode .auth-page-points div {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

body.dark-mode .auth-box.auth-box-standalone {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(155deg, rgba(18, 18, 24, 0.96), rgba(9, 9, 12, 0.92)),
    var(--panel);
}

body.dark-mode .auth-box {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(155deg, rgba(18, 18, 24, 0.98), rgba(10, 10, 13, 0.94)),
    var(--panel);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.4);
}

body.dark-mode .auth-tabs {
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
}

body.dark-mode .auth-tab {
  color: #c2c5ce;
}

body.dark-mode .auth-tab.is-active {
  color: #ffffff;
}

body.dark-mode .auth-form h2,
body.dark-mode .auth-form label,
body.dark-mode .consent-line,
body.dark-mode .auth-form input {
  color: #f5f5f7;
}

body.dark-mode .auth-form input {
  background: rgba(255, 255, 255, 0.04);
}

body.dark-mode .auth-form input::placeholder {
  color: #b7bac2;
}

.auth-verification-step {
  display: none;
  gap: 10px;
}

.auth-verification-step.is-visible {
  display: grid;
}

.auth-message,
.form-note {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--red);
  font-weight: 800;
}

.turnstile-field {
  display: grid;
  gap: 10px;
  margin: 16px 0 6px;
}

.turnstile-widget {
  width: 100%;
  max-width: 100%;
  min-height: 66px;
  overflow: hidden;
}

.turnstile-widget > div {
  max-width: 100%;
}

.turnstile-message {
  min-height: 20px;
  margin: 0;
  color: var(--gray);
  font-size: 0.9rem;
  line-height: 1.45;
}

.turnstile-field.is-error .turnstile-message {
  color: var(--red);
  font-weight: 800;
}

.turnstile-field.is-success .turnstile-message {
  color: var(--green);
}

.turnstile-field.is-pending .turnstile-message {
  color: var(--muted);
}

.auth-form .btn:disabled,
.auth-form .btn[aria-disabled="true"],
#editor-form button[type="submit"]:disabled,
#editor-form button[type="submit"][aria-disabled="true"] {
  opacity: 0.64;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-help {
  margin: -2px 0 4px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.consent-line {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  font-weight: 700;
}

.consent-line input {
  width: auto;
  min-height: auto;
  margin-top: 5px;
}

.consent-line a {
  color: var(--red);
}

.auth-social-block {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.auth-social-divider {
  position: relative;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
}

.auth-social-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: 1px solid rgba(120, 125, 140, 0.22);
}

.auth-social-divider span {
  position: relative;
  z-index: 1;
  padding: 0 12px;
  background: inherit;
}

.google-auth-wrap {
  display: grid;
  justify-items: center;
}

.google-auth-button {
  width: 100%;
  min-height: 44px;
}

.google-auth-button > div {
  width: 100% !important;
}

body.dark-mode .auth-social-divider span {
  background: rgba(14, 14, 19, 0.96);
}

.inline-login {
  padding: 0;
  border: 0;
  color: var(--red);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.article-reading-layout {
  --article-width: 980px;
  --article-text-size: 1.12rem;
  --article-summary-size: 1.22rem;
  --article-title-size: clamp(2.1rem, 4.8vw, 3.25rem);
  --article-h1-size: 2.24rem;
  --article-h2-size: 1.82rem;
  --article-h3-size: 1.32rem;
  --article-h4-size: 1.12rem;
  --article-h5-size: 1.04rem;
  --article-h6-size: 0.96rem;
  --article-caption-size: 0.96rem;
  --article-reference-heading-size: 1.78rem;
  --article-font: "Inter", Arial, sans-serif;
  --article-heading-font: "Inter", Arial, sans-serif;
  display: grid;
  grid-template-columns: 220px minmax(0, var(--article-width)) 220px;
  gap: 36px;
  align-items: start;
  justify-content: center;
  width: min(1540px, calc(100% - 32px));
  margin: 0 auto;
}

body[data-article-width="wide"] .article-reading-layout {
  width: calc(100% - 40px);
  max-width: none;
  grid-template-columns: 240px minmax(0, 1fr) 240px;
  gap: 42px;
}

body[data-article-width="wide"] .article-mobile-drawer {
  grid-template-columns: 240px minmax(0, 1fr) 240px;
  gap: 42px;
}

body[data-article-text="small"] .article-reading-layout {
  --article-text-size: 1.06rem;
  --article-summary-size: 1.16rem;
  --article-title-size: clamp(2.08rem, 4.45vw, 3.08rem);
  --article-h1-size: 2.08rem;
  --article-h2-size: 1.68rem;
  --article-h3-size: 1.24rem;
  --article-h4-size: 1.08rem;
  --article-h5-size: 1rem;
  --article-h6-size: 0.94rem;
  --article-caption-size: 0.92rem;
  --article-reference-heading-size: 1.64rem;
}

body[data-article-text="large"] .article-reading-layout {
  --article-text-size: 1.46rem;
  --article-summary-size: 1.58rem;
  --article-title-size: clamp(2.82rem, 6.25vw, 4.5rem);
  --article-h1-size: 3.04rem;
  --article-h2-size: 2.42rem;
  --article-h3-size: 1.78rem;
  --article-h4-size: 1.46rem;
  --article-h5-size: 1.32rem;
  --article-h6-size: 1.18rem;
  --article-caption-size: 1.14rem;
  --article-reference-heading-size: 2.28rem;
}

body[data-article-font="modern"] .article-reading-layout {
  --article-font: "Inter", Arial, sans-serif;
  --article-heading-font: "Inter", Arial, sans-serif;
}

body[data-article-font="wiki"] .article-reading-layout,
body[data-article-font="serif"] .article-reading-layout {
  --article-font: "Inter", Arial, sans-serif;
  --article-heading-font: "Inter", Arial, sans-serif;
}

@media (max-width: 1320px) {
  .article-reading-layout {
    grid-template-columns: 190px minmax(0, 1fr) 200px;
    gap: 22px;
  }

  body[data-article-width="wide"] .article-reading-layout {
    width: calc(100% - 24px);
    grid-template-columns: 190px minmax(0, 1fr) 210px;
    gap: 24px;
  }

  .article-reading-layout .article-mobile-drawer {
    grid-template-columns: 190px minmax(0, 1fr) 200px;
    gap: 22px;
  }

  body[data-article-width="wide"] .article-mobile-drawer {
    grid-template-columns: 190px minmax(0, 1fr) 210px;
    gap: 24px;
  }

  .navbar {
    width: min(100% - 20px, 1380px);
    gap: 12px;
  }

  .nav-links {
    gap: clamp(10px, 1vw, 16px);
    margin-left: 8px;
    font-size: 0.78rem;
  }

  .nav-links a {
    min-height: 40px;
    padding: 9px 12px;
  }

  .header-actions {
    gap: 6px;
  }

  .navbar.has-open-search .header-actions,
  .navbar:has(.site-search.is-open) .header-actions,
  .navbar:has(.site-search:focus-within) .header-actions {
    min-width: min(330px, 29vw);
  }

  .site-search-field {
    right: 58px;
  }

  .site-search.is-open .site-search-field,
  .site-search:focus-within .site-search-field {
    width: min(220px, 18vw);
  }

  .login-button {
    max-width: 132px;
    padding: 9px 12px;
    font-size: 0.8rem;
  }

  .profile-trigger span {
    max-width: 94px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 980px) {
  .auth-page-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-page-copy h1 {
    max-width: 12ch;
  }

  .auth-panel-wrap {
    justify-self: center;
    width: min(100%, 460px);
  }
}

.article-page {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  max-width: none;
  font-family: var(--article-font);
}

.article-mobile-rail {
  display: none;
}

.article-mobile-drawer {
  grid-column: 1 / -1;
  grid-row: 1;
  position: sticky;
  top: 92px;
  z-index: 15;
  display: grid;
  grid-template-columns: 220px minmax(0, var(--article-width)) 220px;
  gap: 36px;
  align-items: start;
  align-self: start;
  pointer-events: none;
}

.article-mobile-drawer-panel {
  display: contents;
  gap: 12px;
  max-height: calc(100vh - 112px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(215, 25, 32, 0.48) rgba(255, 255, 255, 0.04);
}

.article-tool-stack {
  display: grid;
  gap: 10px;
  min-width: 0;
  align-self: start;
  align-items: start;
  pointer-events: auto;
}

.article-left-tools {
  grid-column: 1;
}

.article-right-tools {
  grid-column: 3;
}

.article-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: start;
  padding: 8px;
  border: 1px solid rgba(11, 11, 13, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(247, 248, 250, 0.92)),
    var(--panel);
  box-shadow: 0 18px 42px rgba(11, 11, 13, 0.1);
}

.article-quick-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid rgba(11, 11, 13, 0.14);
  border-radius: 12px;
  color: var(--black);
  background: rgba(255, 255, 255, 0.74);
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
}

.article-quick-button:hover,
.article-quick-button:focus-visible,
.article-quick-button.is-active {
  border-color: rgba(215, 25, 32, 0.34);
  color: #ffffff;
  background: linear-gradient(135deg, #ff5f66, var(--red));
  box-shadow: 0 12px 24px rgba(215, 25, 32, 0.18);
}

.article-quick-button.is-primary {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #ff5f66, var(--red));
}

.article-action-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(34px, auto);
}

.article-toc-actions .article-quick-button {
  width: 100%;
}

.article-mobile-drawer-panel .article-tool-panel.is-collapsed {
  display: none;
}

.article-mobile-drawer-panel::-webkit-scrollbar {
  width: 8px;
}

.article-mobile-drawer-panel::-webkit-scrollbar-thumb {
  background: rgba(215, 25, 32, 0.42);
  border-radius: 999px;
}

.article-mobile-drawer-panel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

.article-page h1 {
  margin: 10px 0 12px;
  font-family: var(--article-heading-font);
  font-size: var(--article-title-size, clamp(2.1rem, 4.8vw, 3.25rem));
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.05;
}

.article-summary {
  color: var(--gray);
  font-family: var(--article-font);
  font-size: var(--article-summary-size, 1.15rem);
}

.article-author {
  font-family: var(--article-font);
}

.article-meta {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 14px;
  margin: 22px 0 30px;
  font-family: var(--article-font);
}

.article-author-card,
.article-contributors {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(215, 25, 32, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(247, 248, 250, 0.9)),
    var(--panel);
  color: var(--black);
  box-shadow: 0 14px 34px rgba(11, 11, 13, 0.08);
}

.article-author-card::before,
.article-contributors::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--red), rgba(215, 25, 32, 0.18));
}

.article-author-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 14px 18px 14px 20px;
}

.article-meta-label {
  color: var(--red);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-person {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.article-person-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 2px solid rgba(227, 24, 31, 0.45);
  border-radius: 999px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 10px 22px rgba(215, 25, 32, 0.14);
}

.article-person-text {
  display: grid;
  min-width: 0;
  gap: 1px;
  line-height: 1.2;
}

.article-person-text strong {
  overflow-wrap: anywhere;
  font-size: 0.98rem;
}

.article-person-id {
  color: var(--red);
  font-size: 0.9rem;
  font-weight: 800;
}

.article-person-id:hover {
  text-decoration: underline;
}

.article-person-id.muted {
  color: var(--gray);
  font-weight: 700;
}

.article-contributors {
  min-width: min(320px, 100%);
  max-width: 460px;
}

.article-contributors summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 78px;
  padding: 14px 18px 14px 20px;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.article-contributors summary::-webkit-details-marker {
  display: none;
}

.article-contributors summary::before {
  content: "\25B8";
  color: var(--red);
  font-size: 0.82rem;
}

.article-contributors[open] summary::before {
  content: "\25BE";
}

.article-contributors summary span {
  min-width: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(227, 24, 31, 0.12);
  color: var(--red);
  text-align: center;
  font-size: 0.82rem;
}

.article-contributors ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0 18px 18px 20px;
  list-style: none;
  transform-origin: top;
}

.article-contributors[open] ul {
  animation: contributorsOpen 0.34s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.article-contributors li {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(11, 11, 13, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.article-contributor-note,
.article-contributor-empty {
  color: var(--gray);
  font-size: 0.86rem;
}

@keyframes contributorsOpen {
  from {
    opacity: 0;
    transform: translateY(-8px) scaleY(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

.article-toc {
  position: relative;
  align-self: start;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: clamp(320px, 52vh, 540px);
  overflow: hidden;
  padding: 16px;
  color: var(--black);
  border: 1px solid rgba(11, 11, 13, 0.32);
  border-radius: 24px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(247, 248, 250, 0.9)),
    var(--panel);
  box-shadow: 0 20px 46px rgba(11, 11, 13, 0.1);
  font-size: 0.95rem;
}

.article-toc::before,
.article-appearance::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top right, rgba(255, 110, 116, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 22%);
}

.toc-heading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(11, 11, 13, 0.22);
}

.article-panel-toggle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  flex: 0 0 32px;
  border: 1px solid rgba(215, 25, 32, 0.22);
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, #ff5f66, var(--red));
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 20px rgba(215, 25, 32, 0.18);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.article-panel-toggle:hover,
.article-panel-toggle:focus-visible {
  filter: saturate(1.08);
  transform: translateY(-1px);
}

.article-tool-panel {
  transition:
    padding-bottom 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.article-tool-panel > nav,
.article-appearance .article-toolbar,
.article-appearance fieldset {
  max-height: 680px;
  opacity: 1;
  overflow: hidden;
  transform: translateY(0);
  transition:
    max-height 0.34s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.22s ease,
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    margin 0.28s ease,
    padding 0.28s ease;
}

.article-tool-panel.is-collapsed {
  padding-bottom: 18px;
}

.article-toc.is-collapsed nav,
.article-appearance.is-collapsed .article-toolbar,
.article-appearance.is-collapsed fieldset {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.toc-heading strong {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.98rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toc-heading strong::before,
.appearance-heading strong::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6f75, var(--red));
  box-shadow: 0 0 0 6px rgba(215, 25, 32, 0.1);
}

.article-toc nav {
  position: relative;
  display: grid;
  gap: 6px;
  margin-top: 14px;
  min-height: 0;
  max-height: clamp(220px, 38vh, 430px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(215, 25, 32, 0.48) rgba(255, 255, 255, 0.04);
}

.toc-group {
  display: grid;
  gap: 5px;
  opacity: 0;
  transform: translateX(-10px) scale(0.985);
  animation: tocItemReveal 0.46s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--toc-index, 0) * 45ms);
}

.toc-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  min-width: 0;
}

.toc-toggle,
.toc-toggle-spacer {
  width: 28px;
  height: 28px;
}

.toc-toggle {
  padding: 0;
  border: 1px solid rgba(215, 25, 32, 0.12);
  border-radius: 12px;
  color: var(--red);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.58));
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    color 0.2s ease,
    transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.toc-toggle:hover {
  border-color: rgba(255, 110, 116, 0.4);
  background: linear-gradient(135deg, rgba(255, 95, 102, 0.16), rgba(255, 255, 255, 0.82));
  box-shadow: 0 12px 20px rgba(215, 25, 32, 0.12);
  transform: translateY(-1px) scale(1.04);
}

.toc-toggle[aria-expanded="true"] {
  color: #ffffff;
  border-color: rgba(215, 25, 32, 0.58);
  background: linear-gradient(135deg, #ff5f66, var(--red));
  box-shadow: 0 14px 24px rgba(215, 25, 32, 0.24);
  transform: rotate(90deg);
}

.toc-link {
  position: relative;
  isolation: isolate;
  display: -webkit-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 9px 11px;
  overflow: hidden;
  color: #861118;
  border: 1px solid rgba(215, 25, 32, 0.08);
  border-radius: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.toc-link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.34));
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.22s ease, transform 0.24s ease;
}

.toc-link:hover {
  border-color: rgba(255, 110, 116, 0.28);
  box-shadow: 0 14px 24px rgba(11, 11, 13, 0.08);
  text-decoration: none;
  transform: translateX(4px) translateY(-1px);
}

.toc-link:hover::before {
  opacity: 1;
  transform: scale(1);
}

.toc-top-link {
  display: block;
  overflow: hidden;
  color: var(--black);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toc-children {
  display: none;
  gap: 6px;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid rgba(215, 25, 32, 0.12);
  opacity: 0;
  transform: translateY(-6px);
}

.toc-children.is-open {
  display: grid;
  animation: tocChildrenOpen 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tocItemReveal {
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes tocChildrenOpen {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toc-link-child {
  color: #b8171e;
  font-size: 0.84rem;
  padding: 8px 10px;
}

.toc-link-child.level-4,
.toc-link-child.level-5,
.toc-link-child.level-6 {
  padding-left: 16px;
  font-size: 0.8rem;
  color: #d9484e;
}

.toc-link-child.level-5,
.toc-link-child.level-6 {
  padding-left: 22px;
  font-size: 0.76rem;
}

.article-toc.is-empty {
  opacity: 0.78;
}

.article-appearance {
  position: relative;
  align-self: start;
  max-height: none;
  overflow: hidden;
  padding: 18px;
  color: var(--black);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(247, 248, 250, 0.9)),
    var(--panel);
  border: 1px solid rgba(11, 11, 13, 0.32);
  border-radius: 26px;
  box-shadow: 0 20px 46px rgba(11, 11, 13, 0.1);
  font-size: 0.95rem;
}

.article-appearance .article-toolbar {
  position: relative;
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.article-appearance .article-toolbar .btn {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.84rem;
}

.appearance-heading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(11, 11, 13, 0.22);
}

.appearance-heading strong {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.94rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-appearance fieldset {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0 0 18px;
  border: 0;
  border-bottom: 1px solid rgba(11, 11, 13, 0.18);
}

.article-text-stepper {
  gap: 8px;
  grid-template-columns: 1fr;
}

.article-text-stepper-controls {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
}

.article-text-stepper-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(215, 25, 32, 0.22);
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #ff5f66, var(--red));
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(215, 25, 32, 0.18);
  transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}

.article-text-stepper-controls button:hover,
.article-text-stepper-controls button:focus-visible {
  filter: saturate(1.08);
  transform: translateY(-1px);
}

.article-text-stepper-controls button:disabled {
  opacity: 1;
}

.article-text-stepper-controls span {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid rgba(11, 11, 13, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.56));
  color: var(--black);
  font-size: 1.25rem;
  font-weight: 900;
}

.article-appearance legend {
  margin-bottom: 8px;
  color: var(--gray);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.article-appearance label {
  display: block;
  cursor: pointer;
}

.article-appearance input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.article-appearance label span {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(11, 11, 13, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.56));
  color: var(--black);
  font-weight: 800;
  line-height: 1.2;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    filter 0.2s ease;
}

.article-appearance label span::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent);
  opacity: 0.7;
}

.article-appearance label span::after {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid rgba(11, 11, 13, 0.18);
  border-radius: 999px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.article-appearance label:hover span {
  border-color: rgba(255, 110, 116, 0.22);
  box-shadow: 0 14px 24px rgba(11, 11, 13, 0.08);
  transform: translateY(-1px);
  filter: saturate(1.02);
}

.article-appearance input:checked + span {
  color: #ffffff;
  background: linear-gradient(135deg, #ff5f66, var(--red));
  border-color: rgba(215, 25, 32, 0.54);
  box-shadow: 0 16px 30px rgba(215, 25, 32, 0.22);
  transform: translateY(-1px);
}

.article-appearance input:checked + span::after {
  border-color: #ffffff;
  background: #ffffff;
  box-shadow: inset 0 0 0 3px var(--red);
  transform: scale(1.08);
}

body.dark-mode .article-author-card,
body.dark-mode .article-contributors,
body.dark-mode .article-toc,
body.dark-mode .article-appearance {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(165deg, rgba(26, 26, 32, 0.97), rgba(18, 18, 23, 0.92)),
    var(--panel);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.3);
}

body.dark-mode .article-contributors li,
body.dark-mode .article-appearance label span,
body.dark-mode .article-text-stepper-controls span {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

body.dark-mode .toc-heading,
body.dark-mode .appearance-heading,
body.dark-mode .article-appearance fieldset {
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .toc-toggle {
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

body.dark-mode .toc-toggle:hover {
  border-color: rgba(255, 110, 116, 0.34);
  background: linear-gradient(135deg, rgba(255, 95, 102, 0.18), rgba(255, 255, 255, 0.08));
}

body.dark-mode .toc-link {
  color: #ff9ca0;
  border-color: rgba(255, 255, 255, 0.06);
}

body.dark-mode .toc-link:hover {
  background: rgba(215, 25, 32, 0.18);
}

body.dark-mode .toc-link::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.article-toc::-webkit-scrollbar,
.article-appearance::-webkit-scrollbar {
  width: 8px;
}

.article-toc::-webkit-scrollbar-thumb,
.article-appearance::-webkit-scrollbar-thumb {
  background: rgba(215, 25, 32, 0.42);
  border-radius: 999px;
}

.article-toc::-webkit-scrollbar-track,
.article-appearance::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

body.dark-mode .article-appearance label:hover span {
  border-color: rgba(255, 110, 116, 0.28);
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.22);
}

.article-body {
  position: relative;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid rgba(11, 11, 13, 0.22);
  min-width: 0;
  font-size: var(--article-text-size, 1.05rem);
  line-height: 1.7;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.article-reading-layout .article-page.section.reveal-on-scroll {
  opacity: 1;
  transform: none;
  filter: none;
}

.editor-layout.reveal-on-scroll {
  opacity: 1;
  transform: none;
  filter: none;
}

.article-body p {
  margin: 0 0 18px;
  font-size: inherit;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.article-body li,
.article-body td,
.article-body th,
.references li {
  font-size: var(--article-text-size, 1.05rem);
  line-height: 1.68;
}

.article-body :where(span, a, strong, em, u, s, mark, small, code, pre, blockquote, figcaption, caption, label, dt, dd) {
  font-size: inherit;
  color: inherit;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
  margin: 30px 0 12px;
  font-family: var(--article-heading-font);
  font-weight: 500;
  line-height: 1.15;
}

.article-body h1 {
  font-size: var(--article-h1-size, 2.15rem);
}

.article-body h2 {
  font-size: var(--article-h2-size, 1.72rem);
}

.article-body h3 {
  font-family: var(--article-font);
  font-size: var(--article-h3-size, 1.24rem);
  font-weight: 700;
}

.article-body h4 {
  font-family: var(--article-font);
  font-size: var(--article-h4-size, 1.05rem);
  font-weight: 800;
}

.article-body h5 {
  font-family: var(--article-font);
  font-size: var(--article-h5-size, 0.98rem);
  font-weight: 800;
}

.article-body h6 {
  font-family: var(--article-font);
  font-size: var(--article-h6-size, 0.9rem);
  font-weight: 800;
  text-transform: uppercase;
}

.article-body blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  color: var(--gray);
  background: var(--off-white);
  border-left: 4px solid var(--red);
  border-radius: 8px;
}

.article-body pre {
  overflow-x: auto;
  padding: 14px;
  color: #ffffff;
  background: #111114;
  border-radius: 8px;
}

.article-body img {
  display: block;
  max-width: 100%;
  margin: 18px auto;
  border-radius: 8px;
}

.article-body img.is-zoomable {
  cursor: zoom-in;
}

.article-body table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  background: var(--panel);
}

.article-body figure figcaption,
.article-body .wiki-media figcaption,
.article-body table caption {
  font-size: var(--article-caption-size, 0.9rem);
  line-height: 1.55;
}

.article-body figure figcaption small,
.article-body .wiki-media figcaption small {
  font-size: 0.86em;
}

.article-body .reference-file-badge {
  font-size: 0.72em;
}

.article-body th,
.article-body td {
  padding: 10px;
  border: 1px solid var(--border);
  text-align: left;
}

.article-body th {
  background: var(--off-white);
}

.article-body::after {
  content: "";
  display: block;
  clear: both;
}

.article-tags {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-family: var(--article-font);
}

.article-tags[hidden] {
  display: none;
}

.article-tags h2 {
  margin: 0 0 14px;
  color: var(--black);
  font-family: var(--article-heading-font);
  font-size: 1.18rem;
  font-weight: 600;
}

.article-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 11px;
  color: var(--red);
  background: rgba(215, 25, 32, 0.08);
  border: 1px solid rgba(215, 25, 32, 0.18);
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 800;
}

.article-body sup a {
  color: var(--red);
  font-weight: 800;
}

.article-body sup,
.article-body sub {
  font-size: 0.72em;
}

.references {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.references h2 {
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #a2a9b1;
  color: #111114;
  font-size: var(--article-reference-heading-size, 1.7rem);
}

body.dark-mode .references h2 {
  border-bottom-color: #5b5d66;
}

body.dark-mode .wiki-canvas .editor-inline-references .references h2 {
  color: #111114;
  border-bottom-color: #a2a9b1;
}

.editor-references .references {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.editor-references .references a,
.editor-references .references .reference-back {
  color: var(--red);
  font-weight: 800;
}

.reference-file-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.reference-file-badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 2px 6px;
  color: #ffffff;
  background: var(--red);
  border-radius: 4px;
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

.references ol {
  margin: 0;
  padding-left: 22px;
  columns: 2;
  column-gap: 38px;
}

.references li {
  break-inside: avoid;
  margin-bottom: 10px;
  color: #111114;
}

body.dark-mode .article-page {
  color: #f4f4f5;
}

body.dark-mode .article-quick-actions {
  border-color: rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, rgba(19, 19, 24, 0.98), rgba(11, 11, 15, 0.98));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

body.dark-mode .article-quick-button {
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
}

body.dark-mode .article-quick-button:hover,
body.dark-mode .article-quick-button:focus-visible,
body.dark-mode .article-quick-button.is-active,
body.dark-mode .article-quick-button.is-primary {
  color: #ffffff;
  border-color: rgba(255, 111, 117, 0.44);
  background: linear-gradient(135deg, #ff5f66, var(--red));
}

body.dark-mode .article-summary,
body.dark-mode .article-page .eyebrow {
  color: #c8cad2;
}

body.dark-mode .article-body {
  color: #e7e7ec;
  border-top-color: rgba(255, 255, 255, 0.14);
}

body.dark-mode .article-body :where(p, li, td, th, span, font, strong, em, u, s, small, mark, label, dt, dd, figcaption, caption) {
  color: inherit;
}

body.dark-mode .article-page h1,
body.dark-mode .article-body h1,
body.dark-mode .article-body h2,
body.dark-mode .article-body h3,
body.dark-mode .article-body h4,
body.dark-mode .article-body h5,
body.dark-mode .article-body h6,
body.dark-mode .references h2,
body.dark-mode .article-tags h2 {
  color: #ffffff;
}

body.dark-mode .article-body a,
body.dark-mode .references a,
body.dark-mode .references .reference-back {
  color: #ff747a;
}

body.dark-mode .article-body blockquote {
  color: #e9e9ef;
  background: rgba(255, 255, 255, 0.055);
  border-left-color: #ff4b55;
}

body.dark-mode .article-body code {
  color: #f7f7f8;
  background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .article-body pre code {
  padding: 0;
  color: inherit;
  background: transparent;
}

body.dark-mode .article-body pre {
  color: #f4f4f5;
  background: #08080a;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

body.dark-mode .article-body table {
  background: rgba(255, 255, 255, 0.035);
}

body.dark-mode .article-body th,
body.dark-mode .article-body td {
  border-color: rgba(255, 255, 255, 0.14);
}

body.dark-mode .article-body th {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .article-body td {
  color: #e7e7ec;
}

body.dark-mode .references li {
  color: #e7e7ec;
}

body.dark-mode .article-tag {
  color: #ff9da1;
  background: rgba(215, 25, 32, 0.16);
  border-color: rgba(255, 111, 117, 0.28);
}

body.dark-mode .wiki-canvas,
body.dark-mode .editor-references {
  color: #f4f4f5;
  background:
    linear-gradient(180deg, rgba(21, 21, 26, 0.98), rgba(13, 13, 17, 0.98));
  border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .editor-content-tool {
  color: #ff9da1;
  background: rgba(215, 25, 32, 0.16);
  border-color: rgba(255, 111, 117, 0.28);
}

body.dark-mode .editor-content-tool:hover,
body.dark-mode .editor-content-tool:focus-visible {
  color: #ffffff;
  background: var(--red);
  border-color: var(--red);
}

body.dark-mode .wiki-canvas:focus {
  border-color: rgba(255, 72, 82, 0.78);
  box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.18);
}

body.dark-mode .wiki-canvas :where(p, li, td, th, span, font, strong, em, u, s, small, label, figcaption, caption),
body.dark-mode .editor-references :where(p, li, span, strong, em, small) {
  color: inherit;
}

body.dark-mode .wiki-canvas h1,
body.dark-mode .wiki-canvas h2,
body.dark-mode .wiki-canvas h3,
body.dark-mode .wiki-canvas h4,
body.dark-mode .wiki-canvas h5,
body.dark-mode .wiki-canvas h6,
body.dark-mode .editor-references .references h2,
body.dark-mode .wiki-canvas .editor-inline-references .references h2 {
  color: #ffffff;
}

body.dark-mode .wiki-canvas a,
body.dark-mode .editor-references a,
body.dark-mode .editor-references .reference-back {
  color: #ff747a;
}

body.dark-mode .wiki-canvas blockquote {
  color: #e9e9ef;
  background: rgba(255, 255, 255, 0.055);
  border-left-color: #ff4b55;
}

body.dark-mode .wiki-canvas code {
  color: #f7f7f8;
  background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .wiki-canvas pre code {
  padding: 0;
  color: inherit;
  background: transparent;
}

body.dark-mode .wiki-canvas pre {
  color: #f4f4f5;
  background: #08080a;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

body.dark-mode .wiki-canvas table {
  background: rgba(255, 255, 255, 0.035);
}

body.dark-mode .wiki-canvas th,
body.dark-mode .wiki-canvas td {
  border-color: rgba(255, 255, 255, 0.14);
}

body.dark-mode .wiki-canvas th {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .wiki-canvas .editor-inline-references,
body.dark-mode .wiki-canvas .editor-inline-references .references,
body.dark-mode .wiki-canvas .editor-inline-references .references li,
body.dark-mode .wiki-canvas .editor-inline-references .references li::marker {
  color: #f4f4f5;
}

.editor-layout,
.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}

.wide-editor {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: clamp(16px, 2vw, 28px);
}

.wide-editor .editor-form {
  min-width: 0;
}

.wide-editor .wiki-note {
  position: sticky;
  top: 92px;
}

.editor-form,
.profile-form,
.wiki-note,
.profile-preview {
  padding: 24px;
}

.wide-editor .editor-form {
  padding: clamp(18px, 2.3vw, 30px);
}

.editor-form,
.profile-form {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.profile-layout.is-disabled {
  opacity: 0.72;
}

.profile-layout.is-auth-only {
  display: none;
}

.profile-layout.is-public-view {
  display: block;
  max-width: 880px;
}

.profile-layout.is-public-view .profile-form {
  display: none;
}

.editor-meta-row {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 14px;
}

.tag-editor {
  display: grid;
  gap: 8px;
  min-height: 44px;
  padding: 8px;
  background: var(--white);
  border: 1px solid #d7d7dc;
  border-radius: 8px;
}

.tag-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 10px;
  color: var(--red);
  background: rgba(215, 25, 32, 0.08);
  border: 1px solid rgba(215, 25, 32, 0.2);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.tag-chip:hover {
  background: rgba(215, 25, 32, 0.13);
}

.tag-editor input {
  min-height: 34px;
  padding: 4px 2px;
  border: 0;
  background: transparent;
}

.tag-editor input:focus {
  outline: none;
}

.tag-editor.is-locked {
  opacity: 0.68;
  pointer-events: none;
}

.custom-category-input {
  display: none;
  margin-top: 10px;
}

.custom-category-input.is-visible {
  display: block;
  animation: editorControlReveal 0.26s ease both;
}

.editor-summary-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 8px;
  padding: 14px 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  box-shadow: 0 14px 28px rgba(11, 11, 13, 0.08);
  overflow: hidden;
  animation: editorControlReveal 0.34s ease both;
}

.editor-summary-panel::before {
  content: none;
}

.editor-summary-panel > * {
  position: relative;
  z-index: 1;
}

.editor-summary-panel label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--black);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.editor-summary-panel label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(215, 25, 32, 0.78);
  box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.08);
}

#editor-summary {
  min-height: 88px;
  height: 88px;
  padding: 14px 16px;
  resize: none;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    border-color 0.24s ease,
    box-shadow 0.24s ease,
    transform 0.24s ease,
    background 0.24s ease;
}

#editor-summary:focus {
  background: var(--panel);
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.1), 0 12px 24px rgba(215, 25, 32, 0.08);
}

.editor-summary-helper {
  margin: 0;
  color: var(--gray);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.45;
}

body.dark-mode .editor-summary-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

body.dark-mode #editor-summary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode #editor-summary:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 72, 82, 0.78);
}

.wiki-toolbar {
  position: sticky;
  top: 74px;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 248, 250, 0.9)),
    var(--panel);
  border: 1px solid rgba(215, 25, 32, 0.14);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(11, 11, 13, 0.1);
  animation: editorControlReveal 0.34s ease both;
}

.toolbar-menu-group {
  position: relative;
}

.toolbar-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.toolbar-format-trigger {
  min-width: 122px;
  font-weight: 900;
}

.toolbar-icon-trigger {
  min-width: 58px;
}

.toolbar-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 40;
  display: none;
  min-width: 304px;
  max-height: min(560px, 72vh);
  overflow: auto;
  padding: 6px;
  color: var(--black);
  background: var(--panel);
  border: 1px solid rgba(215, 25, 32, 0.14);
  border-radius: 8px;
  box-shadow: var(--shadow);
  animation: editorDropdownOpen 0.2s ease both;
}

.toolbar-menu.is-open {
  display: grid;
  gap: 2px;
}

.toolbar-format-menu {
  min-width: 170px;
}

.toolbar-insert-menu {
  min-width: 286px;
}

.toolbar-menu .toolbar-menu-item {
  width: 100%;
  min-height: 40px;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 10px;
  border: 0;
  color: var(--black);
  background: transparent;
  border-radius: 6px;
  font-weight: 600;
  text-align: left;
}

.toolbar-menu .toolbar-menu-item:hover,
.toolbar-menu .toolbar-menu-item:focus {
  color: var(--black);
  background: var(--off-white);
}

.toolbar-menu-item span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.toolbar-menu-item kbd {
  color: var(--gray);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
}

.toolbar-page-title span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 500;
}

.toolbar-separator {
  width: 1px;
  height: 30px;
  background: rgba(215, 25, 32, 0.18);
}

.wiki-toolbar select {
  width: 170px;
}

.wiki-toolbar button {
  min-width: 42px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(11, 11, 13, 0.1);
  border-radius: 8px;
  color: var(--black);
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(11, 11, 13, 0.06);
  transition:
    transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.wiki-toolbar .toolbar-style-button {
  min-width: 44px;
  width: auto;
  height: 42px;
  padding: 8px 6px;
}

.wiki-toolbar .toolbar-style-button sup,
.wiki-toolbar .toolbar-style-button sub {
  font-size: 0.68em;
  line-height: 0;
}

.wiki-toolbar button:hover {
  color: #ffffff;
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 12px 24px rgba(215, 25, 32, 0.2);
  transform: translateY(-2px);
}

@keyframes editorControlReveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes editorDropdownOpen {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes editorMetaAura {
  from {
    transform: translate3d(0, 0, 0) scale(0.96);
  }

  to {
    transform: translate3d(34px, 18px, 0) scale(1.12);
  }
}

@keyframes editorMetaPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(215, 25, 32, 0.1), 0 0 22px rgba(215, 25, 32, 0.48);
  }

  50% {
    transform: scale(1.12);
    box-shadow: 0 0 0 10px rgba(215, 25, 32, 0.04), 0 0 30px rgba(215, 25, 32, 0.62);
  }
}

@keyframes editorToolbarEntrance {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes editorToolbarAura {
  from {
    transform: translateX(-18px);
    opacity: 0.34;
  }

  to {
    transform: translateX(18px);
    opacity: 0.72;
  }
}

@keyframes editorToolRise {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes editorPanelSlide {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

body.dark-mode .toolbar-menu {
  color: var(--black);
  background: #18181d;
}

body.dark-mode .wiki-toolbar {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(135deg, rgba(28, 28, 34, 0.96), rgba(20, 20, 25, 0.92)),
    var(--panel);
}

body.dark-mode .wiki-toolbar button {
  color: var(--black);
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .toolbar-menu .toolbar-menu-item {
  color: var(--black);
}

body.dark-mode .toolbar-menu .toolbar-menu-item:hover,
body.dark-mode .toolbar-menu .toolbar-menu-item:focus {
  background: #22232a;
}

.wiki-toolbar {
  position: sticky;
  top: 74px;
  z-index: 8;
  isolation: isolate;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(215, 25, 32, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 0%, rgba(215, 25, 32, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(244, 245, 248, 0.82));
  box-shadow:
    0 24px 55px rgba(11, 11, 13, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
  overflow: visible;
  animation: editorToolbarEntrance 0.46s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.wiki-toolbar::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 0;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.34), transparent 34%, rgba(215, 25, 32, 0.18) 66%, transparent);
  opacity: 0.52;
  pointer-events: none;
  animation: editorToolbarAura 8s ease-in-out infinite alternate;
}

.wiki-toolbar > * {
  position: relative;
  z-index: 1;
}

.wiki-toolbar button {
  position: relative;
  isolation: isolate;
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid rgba(11, 11, 13, 0.08);
  border-radius: 16px;
  color: var(--black);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(235, 237, 242, 0.76)),
    rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-weight: 950;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.54);
  box-shadow:
    0 12px 22px rgba(11, 11, 13, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
  transform: translateY(0) scale(1);
  animation: editorToolRise 0.48s var(--tool-delay, 0s) cubic-bezier(0.16, 1, 0.3, 1) both;
  transition:
    transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.24s ease,
    background 0.24s ease,
    border-color 0.24s ease,
    box-shadow 0.24s ease,
    filter 0.24s ease;
}

.wiki-toolbar button::before {
  content: "";
  position: absolute;
  inset: -40% -18%;
  z-index: -1;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.76), transparent 24%),
    linear-gradient(135deg, #ff4b55, var(--red-dark));
  opacity: 0;
  transform: translateY(12px) rotate(8deg) scale(0.72);
  transition:
    opacity 0.28s ease,
    transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.wiki-toolbar button::after {
  content: "";
  position: absolute;
  inset: auto 11px 8px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.35);
  transition:
    opacity 0.22s ease,
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.wiki-toolbar .toolbar-style-button {
  min-width: 46px;
  width: auto;
  height: 46px;
  padding: 8px 9px;
}

.wiki-toolbar .toolbar-style-button sup,
.wiki-toolbar .toolbar-style-button sub {
  font-size: 0.65em;
  line-height: 0;
}

.wiki-toolbar button[data-command="superscript"],
.wiki-toolbar button[data-command="subscript"] {
  gap: 0;
  padding-inline: 12px;
}

.toolbar-script-base {
  display: inline-block;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
}

.toolbar-script-expression {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-size: 0.98rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.03em;
}

.toolbar-script-glyph {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
}

.toolbar-script-glyph.is-super {
  transform: translateY(-0.36rem);
}

.toolbar-script-glyph.is-sub {
  transform: translateY(0.28rem);
}

.wiki-toolbar button:hover,
.wiki-toolbar button:focus-visible {
  color: #ffffff;
  background: linear-gradient(135deg, #ff404b, var(--red-dark));
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow:
    0 18px 34px rgba(215, 25, 32, 0.26),
    0 0 0 4px rgba(215, 25, 32, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.28);
  transform: translateY(-3px) scale(1.055);
  filter: saturate(1.08);
}

.wiki-toolbar button:hover::before,
.wiki-toolbar button:focus-visible::before {
  opacity: 1;
  transform: translateY(0) rotate(0) scale(1);
}

.wiki-toolbar button:hover::after,
.wiki-toolbar button:focus-visible::after {
  opacity: 0.72;
  transform: scaleX(1);
}

.wiki-toolbar button:active {
  transform: translateY(-1px) scale(0.98);
}

.wiki-toolbar button strong,
.wiki-toolbar button em,
.wiki-toolbar button u,
.wiki-toolbar button s,
.wiki-toolbar button sup,
.wiki-toolbar button sub {
  position: relative;
  z-index: 1;
}

.wiki-toolbar .toolbar-style-button:nth-of-type(1) { --tool-delay: 0.01s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(2) { --tool-delay: 0.025s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(3) { --tool-delay: 0.04s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(4) { --tool-delay: 0.055s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(5) { --tool-delay: 0.07s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(6) { --tool-delay: 0.085s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(7) { --tool-delay: 0.1s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(8) { --tool-delay: 0.115s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(9) { --tool-delay: 0.13s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(10) { --tool-delay: 0.145s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(11) { --tool-delay: 0.16s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(12) { --tool-delay: 0.175s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(13) { --tool-delay: 0.19s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(14) { --tool-delay: 0.205s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(15) { --tool-delay: 0.22s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(16) { --tool-delay: 0.235s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(17) { --tool-delay: 0.25s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(18) { --tool-delay: 0.265s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(19) { --tool-delay: 0.28s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(20) { --tool-delay: 0.295s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(21) { --tool-delay: 0.31s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(22) { --tool-delay: 0.325s; }
.wiki-toolbar .toolbar-style-button:nth-of-type(23) { --tool-delay: 0.34s; }

.toolbar-separator {
  width: 2px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(215, 25, 32, 0.42), transparent);
}

.toolbar-menu {
  border-radius: 18px;
  background:
    radial-gradient(circle at 14% 0%, rgba(215, 25, 32, 0.12), transparent 34%),
    var(--panel);
  box-shadow: 0 24px 50px rgba(11, 11, 13, 0.18);
}

.toolbar-menu .toolbar-menu-item {
  border-radius: 12px;
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    color 0.22s ease;
}

.toolbar-menu .toolbar-menu-item:hover,
.toolbar-menu .toolbar-menu-item:focus {
  color: var(--red);
  background: rgba(215, 25, 32, 0.09);
  transform: translateX(3px);
}

body.dark-mode .wiki-toolbar {
  background:
    radial-gradient(circle at 8% 0%, rgba(215, 25, 32, 0.24), transparent 32%),
    linear-gradient(135deg, rgba(35, 35, 43, 0.94), rgba(13, 13, 17, 0.9));
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.dark-mode .wiki-toolbar button {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.06);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.28);
  box-shadow:
    0 14px 26px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.dark-mode .toolbar-menu {
  background:
    radial-gradient(circle at 14% 0%, rgba(215, 25, 32, 0.2), transparent 34%),
    #18181d;
}

.reference-panel {
  display: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.link-panel,
.media-panel,
.table-panel,
.anatomy-atlas-panel,
.anatomy-embed-panel {
  display: none;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.link-panel.is-open,
.media-panel.is-open,
.table-panel.is-open,
.anatomy-atlas-panel.is-open,
.anatomy-embed-panel.is-open,
.reference-panel.is-open {
  display: block;
}

.reference-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.reference-header h3 {
  margin: 0;
}

.reference-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  color: var(--black);
  background: var(--off-white);
  cursor: pointer;
  font-size: 1.5rem;
}

.reference-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--off-white);
}

.reference-tabs button {
  min-height: 42px;
  border: 0;
  color: var(--black);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.reference-tabs button.is-active {
  background: var(--panel);
}

.reference-panel p {
  margin: 12px 14px;
  color: var(--gray);
}

.media-grid,
.table-builder-grid {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.anatomy-atlas-controls {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.anatomy-atlas-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.anatomy-atlas-tabs button {
  min-height: 42px;
  border: 1px solid rgba(215, 25, 32, 0.18);
  border-radius: 8px;
  color: var(--black);
  background: rgba(215, 25, 32, 0.06);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.anatomy-atlas-tabs button.is-active,
.anatomy-atlas-tabs button:hover,
.anatomy-atlas-tabs button:focus-visible {
  color: #ffffff;
  background: linear-gradient(135deg, #ff5f66, var(--red));
  border-color: rgba(215, 25, 32, 0.56);
  outline: none;
}

.anatomy-atlas-results {
  display: grid;
  gap: 10px;
  max-height: 360px;
  padding: 0 14px 14px;
  overflow: auto;
}

.anatomy-atlas-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(215, 25, 32, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.anatomy-atlas-result span,
.wiki-anatomy-card > span {
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.anatomy-atlas-result strong {
  display: block;
  color: var(--black);
}

.anatomy-atlas-result small {
  display: block;
  color: var(--gray);
  font-weight: 800;
}

.anatomy-atlas-result p {
  margin: 6px 0 0;
  color: var(--gray);
  font-size: 0.9rem;
}

.wiki-anatomy-card {
  display: grid;
  gap: 10px;
  margin: 20px 0;
  padding: 16px;
  border: 1px solid rgba(215, 25, 32, 0.18);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  background: rgba(215, 25, 32, 0.05);
}

.wiki-anatomy-card h2 {
  margin: 0;
  font-size: 1.25rem;
}

.wiki-anatomy-card p {
  margin: 0;
}

.wiki-anatomy-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.wiki-anatomy-card dl div {
  display: grid;
  grid-template-columns: minmax(90px, 0.22fr) minmax(0, 1fr);
  gap: 10px;
}

.wiki-anatomy-card dt {
  color: var(--black);
  font-weight: 900;
}

.wiki-anatomy-card dd {
  margin: 0;
  color: var(--gray);
}

body.dark-mode .anatomy-atlas-result {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.07);
}

body.dark-mode .anatomy-atlas-result strong,
body.dark-mode .wiki-anatomy-card dt {
  color: #f3f3f5;
}

body.dark-mode .wiki-anatomy-card {
  border-color: rgba(255, 95, 102, 0.28);
  border-left-color: #ff6c72;
  background: rgba(255, 95, 102, 0.1);
}

@media (max-width: 640px) {
  .anatomy-atlas-result {
    grid-template-columns: 1fr;
  }

  .anatomy-atlas-result .btn {
    width: 100%;
  }

  .wiki-anatomy-card dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.media-size-control {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 110px;
  gap: 10px;
  align-items: center;
}

.media-size-control input[type="range"] {
  padding: 0;
}

.media-grid textarea {
  min-height: 72px;
  resize: vertical;
}

.media-align-control {
  display: grid;
  grid-template-columns: 42px repeat(3, minmax(0, 1fr)) 42px;
  gap: 8px;
  align-items: center;
}

.media-align-control.media-align-secondary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-align-control button {
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(215, 25, 32, 0.18);
  border-radius: 8px;
  color: var(--black);
  background: rgba(215, 25, 32, 0.06);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
}

.media-align-control button.is-active,
.media-align-control button[aria-pressed="true"] {
  color: #ffffff;
  background: linear-gradient(135deg, #ff5f66, var(--red));
  border-color: rgba(215, 25, 32, 0.56);
  box-shadow: 0 12px 24px rgba(215, 25, 32, 0.16);
}

.media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.media-actions .btn,
.table-builder-grid .btn,
.anatomy-embed-grid .btn {
  width: fit-content;
}

.anatomy-embed-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.28fr) minmax(0, 1fr);
  gap: 12px 14px;
  padding: 16px;
}

.anatomy-embed-grid input,
.anatomy-embed-grid select,
.anatomy-embed-grid textarea {
  width: 100%;
}

.anatomy-embed-layer-picker {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(215, 25, 32, 0.16);
  border-radius: 8px;
}

.anatomy-embed-layer-picker legend {
  padding: 0 6px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
}

.anatomy-embed-layer-picker label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9rem;
  font-weight: 800;
}

.article-anatomy-embed {
  display: grid;
  gap: 10px;
  margin: 28px 0;
}

.article-anatomy-stage {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  border: 1px solid rgba(215, 25, 32, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 45%, rgba(215, 25, 32, 0.16), transparent 34%),
    linear-gradient(180deg, #16171d 0%, #0d0e13 100%);
}

.article-anatomy-stage canvas {
  display: block;
  width: 100%;
  height: 460px;
}

.article-anatomy-toolbar {
  position: absolute;
  z-index: 2;
  left: 10px;
  right: 10px;
  top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  pointer-events: none;
}

.article-anatomy-toolbar button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(20, 21, 28, 0.78);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  pointer-events: auto;
}

.article-anatomy-toolbar button.is-active,
.article-anatomy-toolbar button:hover,
.article-anatomy-toolbar button:focus-visible {
  border-color: rgba(255, 95, 102, 0.75);
  background: linear-gradient(135deg, #ff5f66, var(--red));
  outline: none;
}

.article-anatomy-status {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #f6f6f8;
  background: rgba(10, 10, 14, 0.74);
  font-size: 0.86rem;
  font-weight: 800;
}

.article-anatomy-embed.is-ready .article-anatomy-status {
  opacity: 0;
  pointer-events: none;
}

.wiki-canvas .article-anatomy-embed {
  padding: 12px;
  border: 1px dashed rgba(215, 25, 32, 0.35);
  border-radius: 8px;
  background: rgba(215, 25, 32, 0.04);
}

.wiki-canvas .article-anatomy-stage {
  min-height: 170px;
}

.wiki-canvas .article-anatomy-stage canvas,
.wiki-canvas .article-anatomy-toolbar,
.wiki-canvas .article-anatomy-status {
  display: none;
}

.article-anatomy-preview {
  display: grid;
  min-height: 170px;
  place-items: center;
  padding: 20px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(215, 25, 32, 0.28), rgba(20, 21, 28, 0.92)),
    #121318;
  text-align: center;
}

.article-anatomy-preview strong {
  display: block;
  font-size: 1.1rem;
}

.article-anatomy-preview span {
  color: #d7d9e1;
  font-size: 0.9rem;
}

body.dark-mode .article-anatomy-embed figcaption {
  color: #d9dbe3;
}

.reference-panel,
.link-panel,
.media-panel,
.table-panel,
.anatomy-atlas-panel,
.anatomy-embed-panel {
  border-radius: 20px;
  background:
    radial-gradient(circle at 10% 0%, rgba(215, 25, 32, 0.12), transparent 34%),
    var(--panel);
  box-shadow: 0 24px 54px rgba(11, 11, 13, 0.16);
}

.link-panel.is-open,
.media-panel.is-open,
.table-panel.is-open,
.anatomy-atlas-panel.is-open,
.anatomy-embed-panel.is-open,
.reference-panel.is-open {
  animation: editorPanelSlide 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.reference-header {
  background: linear-gradient(135deg, rgba(215, 25, 32, 0.08), transparent);
}

.reference-close {
  position: relative;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(215, 25, 32, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(239, 240, 244, 0.82)),
    var(--off-white);
  box-shadow: 0 10px 22px rgba(11, 11, 13, 0.08);
  transition:
    transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.24s ease,
    background 0.24s ease,
    box-shadow 0.24s ease;
}

.reference-close:hover,
.reference-close:focus-visible {
  color: #ffffff;
  background: linear-gradient(135deg, #ff404b, var(--red-dark));
  box-shadow: 0 16px 30px rgba(215, 25, 32, 0.24);
  transform: rotate(90deg) scale(1.05);
}

.reference-tabs button {
  transition:
    transform 0.22s ease,
    color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.reference-tabs button:hover,
.reference-tabs button:focus-visible,
.reference-tabs button.is-active {
  color: var(--red);
  background: rgba(215, 25, 32, 0.08);
  box-shadow: inset 0 -2px 0 var(--red);
  transform: translateY(-1px);
}

body.dark-mode .reference-panel,
body.dark-mode .link-panel,
body.dark-mode .media-panel,
body.dark-mode .table-panel,
body.dark-mode .anatomy-atlas-panel,
body.dark-mode .anatomy-embed-panel {
  background:
    radial-gradient(circle at 10% 0%, rgba(215, 25, 32, 0.2), transparent 34%),
    var(--panel);
  box-shadow: 0 26px 58px rgba(0, 0, 0, 0.4);
}

body.dark-mode .reference-close {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.media-viewer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px 72px;
  background: rgba(0, 0, 0, 0.92);
}

.media-viewer.is-open {
  display: flex;
}

.media-viewer figure {
  max-width: min(1120px, 100%);
  max-height: 92vh;
  margin: 0;
  color: #ffffff;
  text-align: center;
}

.media-viewer img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: #ffffff;
}

.media-viewer figcaption {
  margin-top: 12px;
  color: #f4f4f5;
}

.media-viewer-close,
.media-viewer-nav,
.media-viewer-actions a {
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-weight: 800;
}

.media-viewer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  font-size: 2rem;
}

.media-viewer-nav {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 64px;
  transform: translateY(-50%);
  font-size: 2.6rem;
}

.media-viewer-nav.previous {
  left: 16px;
}

.media-viewer-nav.next {
  right: 16px;
}

.media-viewer-actions {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: #ffffff;
}

.media-viewer-actions a {
  padding: 8px 12px;
  border-radius: 8px;
}

.link-tab-content {
  display: none;
  padding: 14px;
}

.link-tab-content.is-active {
  display: grid;
  gap: 10px;
}

.link-results {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow: auto;
}

.link-result {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--off-white);
}

.link-result img {
  width: 72px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
}

.link-result-placeholder {
  width: 72px;
  height: 52px;
  border-radius: 6px;
}

.link-result strong {
  display: block;
  margin-bottom: 4px;
}

.link-result p {
  margin: 0;
  color: var(--gray);
  font-size: 0.9rem;
}

.cover-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.reference-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto auto;
  gap: 10px;
  padding: 0 14px 14px;
}

.reference-row .btn {
  width: fit-content;
  white-space: nowrap;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.editor-preview {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

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

.admin-submissions {
  display: grid;
  gap: 18px;
}

.download-library-form {
  gap: 16px;
  margin-bottom: 22px;
}

.download-library-form .empty-state {
  margin: 0;
}

.download-library-meta {
  margin: 8px 0 18px !important;
  color: var(--gray);
  font-size: 0.88rem;
}

.download-library-card-image {
  display: block;
  width: calc(100% + 48px);
  max-width: none;
  margin: -24px -24px 18px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 22px 22px 0 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#download-library-grid {
  align-items: stretch;
}

#download-library-grid .feature-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

#download-library-grid .feature-card span,
#download-library-grid .feature-card h3,
#download-library-grid .feature-card p,
#download-library-grid .feature-card a {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#download-library-grid .feature-card .btn {
  justify-self: start;
  white-space: normal;
}

.download-library-admin-image {
  display: block;
  width: 100%;
  max-height: 240px;
  margin: 0 0 18px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
}

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

.writer-permission-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 10px;
}

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

.writer-permission-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  color: var(--black);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(11, 11, 13, 0.06);
}

.writer-permission-card strong,
.writer-permission-card span {
  display: block;
}

.writer-permission-card span {
  margin-top: 4px;
  color: var(--gray);
  font-size: 0.9rem;
  font-weight: 700;
}

.admin-review-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.admin-review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.admin-review-head h2 {
  margin: 8px 0 6px;
  font-size: 1.35rem;
  line-height: 1.25;
}

.admin-review-head p {
  margin: 0;
  color: var(--gray);
}

.admin-review-meta {
  margin-top: 6px;
  font-size: 0.86rem;
  word-break: break-word;
}

.admin-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-warning-label {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: var(--black);
}

.profile-report-card .admin-review-actions .btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
}

.profile-report-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(5, 5, 7, 0.72);
  backdrop-filter: blur(10px);
}

.profile-report-modal.is-open {
  display: grid;
  animation: editorPanelSlide 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.profile-report-dialog {
  width: min(560px, 100%);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--black);
  background: var(--panel);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.profile-report-dialog h2 {
  margin: 12px 0 6px;
  font-size: 1.45rem;
}

.profile-report-dialog p {
  margin: 0 0 14px;
  color: var(--gray);
}

.profile-report-dialog textarea {
  resize: vertical;
}

.profile-report-dialog .profile-report-close:first-child {
  float: right;
}

.admin-diff,
.admin-preview {
  margin-top: 18px;
}

.admin-diff h3,
.admin-preview h3 {
  margin: 0 0 12px;
}

.diff-row {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--off-white);
}

.diff-row + .diff-row {
  margin-top: 12px;
}

.diff-row strong {
  display: block;
  margin-bottom: 10px;
}

.diff-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.diff-columns div {
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--panel);
}

.diff-columns span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.diff-columns p {
  max-height: 220px;
  margin: 0;
  overflow: auto;
  color: var(--gray);
  white-space: pre-wrap;
}

.diff-visual {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.diff-visual p {
  margin: 0;
  color: var(--black);
  line-height: 1.8;
}

.diff-legend {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.diff-visual mark {
  display: inline;
  padding: 3px 6px;
  border-radius: 6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.diff-same {
  color: #6b7280;
  background: transparent;
}

.diff-added {
  color: #14532d;
  background: rgba(34, 197, 94, 0.22);
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.14);
}

.diff-removed {
  color: #854d0e;
  background: rgba(245, 158, 11, 0.22);
  box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.18);
  text-decoration: line-through;
}

.diff-row-mixed {
  border-color: rgba(217, 119, 6, 0.3);
  box-shadow: inset 4px 0 0 rgba(217, 119, 6, 0.48);
}

.diff-row-added {
  border-color: rgba(22, 163, 74, 0.24);
  box-shadow: inset 4px 0 0 rgba(22, 163, 74, 0.42);
}

.diff-row-removed {
  border-color: rgba(217, 119, 6, 0.26);
  box-shadow: inset 4px 0 0 rgba(217, 119, 6, 0.42);
}

.diff-legend-mixed {
  color: #9a3412;
  background: rgba(251, 146, 60, 0.16);
}

.diff-legend-added {
  color: #166534;
  background: rgba(34, 197, 94, 0.16);
}

.diff-legend-removed {
  color: #92400e;
  background: rgba(245, 158, 11, 0.16);
}

.diff-legend-neutral {
  color: var(--gray);
  background: rgba(107, 114, 128, 0.1);
}

.admin-preview {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.wiki-note h2,
.profile-preview h2 {
  margin: 0 0 10px;
}

.wiki-note p,
.profile-preview p {
  color: var(--gray);
}

.profile-preview {
  position: relative;
  text-align: center;
  overflow: hidden;
}

.profile-layout.is-loading .profile-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  animation: profileLoadingSweep 1.4s ease-in-out infinite;
}

.profile-layout.is-loading .profile-form {
  opacity: 0.68;
  pointer-events: none;
}

.profile-layout.is-loading #profile-preview-img {
  filter: grayscale(1);
  opacity: 0.58;
}

@keyframes profileLoadingSweep {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(100%);
  }
}

.profile-preview img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border: 4px solid var(--red);
  border-radius: 999px;
}

.profile-photo-picker {
  display: grid;
  gap: 8px;
}

.profile-photo-button {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 14px;
  border: 1px solid rgba(215, 25, 32, 0.22);
  border-radius: 8px;
  color: var(--black);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(247, 248, 250, 0.82)),
    var(--panel);
  box-shadow: 0 14px 30px rgba(11, 11, 13, 0.08);
  cursor: pointer;
  transition:
    transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease;
}

.profile-photo-button:hover {
  border-color: var(--red);
  box-shadow: 0 18px 36px rgba(215, 25, 32, 0.16);
  transform: translateY(-2px);
}

.profile-photo-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f0444a, var(--red));
  box-shadow: 0 10px 20px rgba(215, 25, 32, 0.24);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
}

.profile-photo-button strong,
.profile-photo-button small {
  display: block;
}

.profile-photo-button strong {
  font-size: 0.98rem;
  line-height: 1.2;
}

.profile-photo-button small {
  margin-top: 3px;
  color: var(--gray);
  font-weight: 800;
}

body.dark-mode .profile-photo-button {
  border-color: rgba(215, 25, 32, 0.24);
  background:
    linear-gradient(135deg, rgba(28, 28, 34, 0.94), rgba(20, 20, 25, 0.88)),
    var(--panel);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
}

.profile-public-hero {
  max-width: 880px;
}

.profile-public-hero h1 {
  max-width: 780px;
}

.public-profile-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 248, 250, 0.9)),
    var(--panel);
}

.public-profile-cover {
  min-height: 128px;
  background:
    radial-gradient(circle at 18% 22%, rgba(215, 25, 32, 0.24), transparent 30%),
    linear-gradient(135deg, #18181d 0%, #2a2a31 48%, #d71920 100%);
}

.public-profile-main {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: end;
  padding: 0 28px 28px;
}

.public-profile-avatar {
  width: 132px;
  height: 132px;
  margin-top: -54px;
  object-fit: cover;
  border: 5px solid var(--panel);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: 0 18px 36px rgba(11, 11, 13, 0.18);
}

.profile-preview .public-profile-avatar {
  width: 132px;
  height: 132px;
  border-color: var(--panel);
}

.public-profile-identity {
  min-width: 0;
  padding-top: 20px;
}

.public-profile-identity span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  padding: 5px 10px;
  border: 1px solid rgba(215, 25, 32, 0.28);
  border-radius: 999px;
  color: var(--red);
  background: rgba(215, 25, 32, 0.08);
  font-size: 0.82rem;
  font-weight: 900;
}

.public-profile-identity h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.02;
}

.public-profile-identity p {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--gray);
  font-size: 1rem;
  line-height: 1.7;
}

.public-profile-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding-bottom: 4px;
}

.public-profile-card.is-missing {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 280px;
  padding: 34px;
  text-align: center;
}

.public-profile-mark {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--red);
  font-size: 2rem;
  font-weight: 900;
}

body.dark-mode .public-profile-card {
  background:
    linear-gradient(180deg, rgba(20, 20, 25, 0.98), rgba(15, 15, 19, 0.94)),
    var(--panel);
}

body.dark-mode .public-profile-avatar,
body.dark-mode .profile-preview .public-profile-avatar {
  border-color: var(--panel);
}

@media (max-width: 760px) {
  .profile-layout.is-public-view {
    max-width: 100%;
  }

  .public-profile-main {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 14px;
    padding: 0 18px 24px;
    text-align: center;
  }

  .public-profile-avatar {
    margin-top: -58px;
  }

  .public-profile-identity {
    padding-top: 0;
  }

  .public-profile-identity span {
    margin-inline: auto;
  }

  .public-profile-actions {
    justify-content: center;
    width: 100%;
  }

  .public-profile-actions .btn {
    width: 100%;
  }
}

.footer {
  position: relative;
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px max(16px, calc((100% - 1120px) / 2)) max(24px, env(safe-area-inset-bottom));
  color: #ffffff;
  background: var(--dark);
  overflow: visible;
  width: 100%;
  min-height: 132px;
}

.footer::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -16px;
  height: 16px;
  background: inherit;
  pointer-events: none;
}

.footer.reveal-on-scroll {
  opacity: 1;
  transform: none;
  filter: none;
}

.footer p {
  margin: 0;
}

.footer a {
  color: #ffb7b7;
  font-weight: 800;
}

.footer-social-links {
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.footer .footer-social-links a {
  color: #ffffff;
}

.footer-social-links .site-social-link {
  width: auto;
  min-height: 42px;
  gap: 8px;
  padding: 0 14px;
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05));
}

.footer-legal {
  flex: 0 1 100%;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.footer-legal a:hover {
  color: #ffffff;
}

.legal-page {
  max-width: 880px;
  color: var(--black);
}

.legal-page h1 {
  margin: 12px 0 22px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1;
}

.legal-page h2 {
  margin: 30px 0 10px;
  font-size: 1.35rem;
}

.legal-page p,
.legal-page li {
  color: var(--gray);
}

.legal-page ul {
  padding-left: 20px;
}

.legal-note {
  margin-top: 34px;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--panel);
  font-size: 0.92rem;
}

.content-consent-panel {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--off-white);
}

.legal-modal-box h2 {
  margin-top: 16px;
}

.admin-legal-meta {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--off-white);
}

.admin-legal-meta p {
  margin: 0;
  color: var(--gray);
}

.admin-editor-note {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(234, 88, 12, 0.34);
  border-radius: 8px;
  background: rgba(234, 88, 12, 0.08);
}

.admin-editor-note strong {
  color: #c2410c;
}

.admin-editor-note p {
  margin: 6px 0 0;
  color: var(--black);
}

body.dark-mode .diff-row {
  background: rgba(255, 255, 255, 0.03);
}

body.dark-mode .diff-columns div,
body.dark-mode .diff-visual,
body.dark-mode .admin-preview {
  background: rgba(255, 255, 255, 0.025);
}

body.dark-mode .diff-columns p,
body.dark-mode .diff-same,
body.dark-mode .admin-review-meta {
  color: #b6bcc7;
}

body.dark-mode .diff-visual p,
body.dark-mode .admin-editor-note p {
  color: #f5f5f7;
}

body.dark-mode .diff-added {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.18);
}

body.dark-mode .diff-removed {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.2);
}

body.dark-mode .diff-legend-mixed {
  color: #fdba74;
  background: rgba(251, 146, 60, 0.18);
}

body.dark-mode .diff-legend-added {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.16);
}

body.dark-mode .diff-legend-removed {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.16);
}

body.dark-mode .diff-legend-neutral {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
}

.admin-badge.secondary {
  margin-left: 6px;
  background: #5b5f6a;
}

@media (max-width: 1180px) {
  .section.wide-editor {
    width: min(100% - 28px, 960px);
  }

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

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

  .wide-editor .wiki-note {
    position: static;
  }

  .navbar {
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
    order: 2;
  }

  .menu-toggle[aria-expanded="true"] {
    border-color: rgba(255, 111, 117, 0.48);
    background:
      linear-gradient(180deg, rgba(255, 95, 102, 0.92), rgba(181, 15, 22, 0.9));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.18),
      0 16px 28px rgba(215, 25, 32, 0.28);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .header-actions {
    min-width: 0;
    margin-left: auto;
    order: 1;
  }

  .navbar.has-open-search .header-actions,
  .navbar:has(.site-search.is-open) .header-actions,
  .navbar:has(.site-search:focus-within) .header-actions {
    min-width: 0;
  }

  .site-search {
    width: 56px;
    order: 4;
  }

  .site-search.is-open,
  .site-search:focus-within {
    width: 56px;
  }

  .site-search.is-open .site-search-field,
  .site-search:focus-within .site-search-field {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    left: auto;
    z-index: 90;
    width: min(360px, calc(100vw - 24px));
    opacity: 1;
    transform: none;
  }

  .search-suggestions {
    position: absolute;
    top: calc(100% + 68px);
    right: 0;
    left: auto;
    width: min(360px, calc(100vw - 24px));
    max-height: min(60vh, 420px);
    overflow-y: auto;
  }

  .nav-links {
    order: 3;
    display: none;
    width: 100%;
    margin: 12px 0 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    background:
      linear-gradient(180deg, rgba(19, 19, 24, 0.98), rgba(10, 10, 14, 0.96));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      0 26px 48px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .nav-links.is-open {
    display: flex;
    animation: mobileMenuReveal 0.34s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    width: 100%;
    justify-content: space-between;
    min-height: 52px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  }

  .nav-dropdown > a::after {
    content: "";
    width: 10px;
    height: 10px;
    margin-left: 14px;
    border-right: 2px solid rgba(255, 255, 255, 0.86);
    border-bottom: 2px solid rgba(255, 255, 255, 0.86);
    transform: rotate(45deg);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    flex: 0 0 auto;
  }

  .nav-dropdown.is-expanded > a::after {
    transform: rotate(225deg);
  }

  .nav-submenu {
    position: static;
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0 10px;
    border: 0;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transition:
      max-height 0.34s cubic-bezier(0.16, 1, 0.3, 1),
      opacity 0.24s ease,
      transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
      padding 0.3s ease,
      margin 0.3s ease,
      border-color 0.3s ease;
  }

  .nav-dropdown.is-expanded .nav-submenu {
    margin-top: -2px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
    max-height: 320px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  .nav-submenu::before {
    display: none;
  }

  .nav-submenu a {
    min-height: 46px;
    padding: 11px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
  }

  .nav-submenu a:hover,
  .nav-submenu a:focus-visible {
    transform: translateX(4px);
  }

  @keyframes mobileMenuReveal {
    from {
      opacity: 0;
      transform: translateY(-10px) scale(0.985);
    }

    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
}

@media (max-width: 1180px) {
  .article-reading-layout {
    grid-template-columns: 1fr;
    gap: 18px;
    width: min(100% - 24px, 760px);
  }

  body[data-article-width="wide"] .article-reading-layout {
    width: min(100% - 24px, 760px);
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .article-page.section {
    grid-column: 1;
    width: 100%;
    padding: 40px 0;
  }

  .article-mobile-rail {
    position: fixed;
    top: 88px;
    right: 14px;
    z-index: 97;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    color: #ffffff;
    background:
      linear-gradient(180deg, rgba(26, 26, 32, 0.96), rgba(15, 15, 20, 0.94));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 18px 34px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    transition:
      transform 0.24s ease,
      border-color 0.24s ease,
      background 0.24s ease,
      box-shadow 0.24s ease;
  }

  .article-tools-icon {
    display: grid;
    grid-template-columns: 15px 12px;
    grid-template-rows: repeat(2, 5px);
    align-items: center;
    justify-content: center;
    gap: 5px 4px;
  }

  .article-tools-icon span {
    display: block;
    width: 15px;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
  }

  .article-tools-icon strong {
    grid-row: 1 / 3;
    grid-column: 2;
    color: #ff747a;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1;
  }

  body.article-mobile-tools-open .article-mobile-rail {
    border-color: rgba(255, 111, 117, 0.46);
    background: linear-gradient(135deg, rgba(255, 95, 102, 0.92), rgba(181, 15, 22, 0.9));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      0 18px 34px rgba(215, 25, 32, 0.26);
    transform: translateX(-2px) scale(1.04);
  }

  body.article-mobile-tools-open .article-tools-icon strong {
    color: #ffffff;
  }

  .article-mobile-drawer {
    position: fixed;
    inset: 74px 0 0;
    z-index: 96;
    display: block;
    pointer-events: none;
    background: rgba(9, 10, 13, 0);
    transition: background 0.28s ease;
  }

  body.article-mobile-tools-open .article-mobile-drawer {
    pointer-events: auto;
    background: rgba(9, 10, 13, 0.28);
  }

  body.article-mobile-tools-open {
    overflow: hidden;
  }

  .article-mobile-drawer-panel {
    display: grid;
    gap: 12px;
    position: absolute;
    top: 0;
    right: 0;
    width: min(92vw, 380px);
    height: 100%;
    padding: 14px 10px 22px;
    overflow-y: auto;
    background:
      linear-gradient(180deg, rgba(20, 21, 26, 0.98), rgba(12, 13, 18, 0.98));
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -24px 0 48px rgba(0, 0, 0, 0.28);
    transform: translateX(104%);
    transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .article-tool-stack,
  .article-left-tools,
  .article-right-tools {
    grid-column: auto;
  }

  .article-mobile-drawer-panel .article-tool-panel.is-collapsed {
    display: none;
  }

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

  .article-contributors {
    min-width: 0;
    max-width: 100%;
  }

  .article-toc {
    position: static;
    padding: 12px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
  }

  .article-appearance {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
  }

  .article-appearance .article-toolbar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .article-appearance fieldset {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .article-appearance legend {
    grid-column: 1 / -1;
  }

  .article-appearance label {
    min-width: 0;
  }

  .article-appearance label span {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  .article-appearance label span::after {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    margin-left: 8px;
  }

  .article-text-stepper {
    grid-template-columns: 1fr !important;
  }

  .article-text-stepper-controls {
    grid-column: 1 / -1;
    grid-template-columns: 46px minmax(64px, 1fr) 46px;
    gap: 8px;
  }

  .article-text-stepper-controls button {
    width: 46px;
    height: 42px;
  }

  .article-text-stepper-controls span {
    min-width: 64px;
    min-height: 42px;
  }

  .navbar {
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
    order: 2;
  }

  .header-actions {
    min-width: 0;
    margin-left: auto;
    order: 1;
  }

  .navbar.has-open-search .header-actions,
  .navbar:has(.site-search.is-open) .header-actions,
  .navbar:has(.site-search:focus-within) .header-actions {
    min-width: 0;
  }

  .site-search {
    width: 56px;
  }

  .site-search.is-open,
  .site-search:focus-within {
    width: 56px;
  }

  .site-search.is-open .site-search-field,
  .site-search:focus-within .site-search-field {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    left: auto;
    z-index: 90;
    width: min(360px, calc(100vw - 24px));
    opacity: 1;
    transform: none;
  }

  .search-suggestions {
    position: absolute;
    top: calc(100% + 68px);
    right: 0;
    left: auto;
    width: min(360px, calc(100vw - 24px));
    max-height: min(60vh, 420px);
    overflow-y: auto;
  }

  .nav-links {
    order: 3;
    transform: none;
    display: none;
    width: 100%;
    margin-top: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    background:
      linear-gradient(165deg, rgba(18, 18, 22, 0.98), rgba(10, 10, 14, 0.94));
    box-shadow: 0 24px 44px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .nav-links.is-open {
    display: flex;
    animation: mobileMenuReveal 0.34s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
  }

  .nav-submenu {
    position: static;
    display: grid;
    gap: 8px;
    margin: 8px 0 4px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    opacity: 1;
    pointer-events: auto;
    transform: none;
    visibility: visible;
  }

  .nav-submenu a {
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
  }

  .nav-submenu a:hover {
    transform: translateX(3px);
  }

  @keyframes mobileMenuReveal {
    from {
      opacity: 0;
      transform: translateY(-10px) scale(0.985);
    }

    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  .profile-trigger span {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero,
  .calculator-feature,
  .editor-layout,
  .profile-layout {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .calculator-feature-text,
  .calculator-feature-grid,
  .home-feature-posts,
  .home-blog-strip .section-heading,
  .home-blog-actions {
    grid-column: auto;
    width: min(100% - 32px, 1120px);
    margin-left: auto;
    margin-right: auto;
  }

  .home-card-grid,
  .home-post-grid {
    grid-template-columns: 1fr;
  }

  .home-visual-card {
    grid-template-rows: 240px 1fr;
  }

  .home-blog-strip {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 20px;
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .home-blog-actions {
    justify-content: flex-start;
  }

  .editor-meta-row,
  .reference-row,
  .cover-row,
  .time-input-row,
  .form-row,
  .writer-permission-form,
  .diff-columns,
  .link-result {
    grid-template-columns: 1fr;
  }

  .admin-review-head {
    display: grid;
  }

  .my-post-card {
    display: grid;
  }

  .writer-permission-card {
    display: grid;
  }

  .admin-review-actions {
    justify-content: flex-start;
  }

  .wiki-toolbar {
    position: static;
  }

  .toolbar-menu {
    left: 0;
    right: auto;
    min-width: min(304px, calc(100vw - 48px));
  }

  .references ol {
    columns: 1;
  }

  .hero {
    padding-top: 56px;
  }

  .hero-media img {
    aspect-ratio: 16 / 10;
  }

  .hero-panel {
    position: static;
    margin-top: 14px;
  }

  .feature-grid,
  .category-grid,
  .blog-grid,
  .calculator-grid,
  .calculator-directory,
  .muscle-grid,
  .social-layout,
  .calculator-category-grid {
    grid-template-columns: 1fr;
  }

  .calculator-detail-layout {
    grid-template-columns: 1fr;
    gap: 38px;
    width: min(100% - 32px, 640px);
  }

  .calculator-result-card {
    position: static;
  }

  .calculator-reading-panel {
    margin-top: 0;
  }

  .calculator-sources-wide .calculator-source-list {
    columns: 1;
  }

  .social-tabs {
    flex-wrap: wrap;
  }

  .social-tabs .btn {
    flex: 1 1 160px;
  }

  .site-search {
    width: 56px;
    order: 4;
  }

  .site-search.is-open,
  .site-search:focus-within {
    width: 56px;
  }

  .site-search.is-open .site-search-field,
  .site-search:focus-within .site-search-field {
    width: min(320px, calc(100vw - 24px));
  }

  .friend-row {
    grid-template-columns: 52px 1fr;
  }

  .friend-row-actions {
    width: 100%;
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .messages-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .friend-row .btn {
    width: 100%;
    grid-column: 1 / -1;
  }

  .request-lists {
    grid-template-columns: 1fr;
  }

  .request-status {
    width: 100%;
    grid-column: 1 / -1;
    text-align: center;
  }

  #message-thread {
    max-height: 58vh;
  }
}

@media (max-width: 760px) {
  .home-hero {
    gap: 26px;
    padding-top: 44px;
    padding-bottom: 40px;
  }

  .hero-media img,
  .home-hero-media img {
    aspect-ratio: 16 / 11;
  }

  .page-hero.section {
    padding-top: 48px;
    padding-bottom: 42px;
  }

  .hero-content h1,
  .page-hero h1 {
    font-size: clamp(2rem, 9vw, 2.7rem);
    line-height: 1.06;
  }

  .section-heading h2,
  .calculator-feature-text h2 {
    font-size: clamp(1.65rem, 7vw, 2.25rem);
  }

  .calculator-feature {
    gap: 24px;
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .calculator-category-grid,
  .calculator-feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .category-card,
  .post-card,
  .calculator-card,
  .calculator-link-card,
  .calculator-info-block,
  .social-panel,
  .editor-form,
  .profile-form,
  .wiki-note,
  .profile-preview {
    padding: 18px;
  }

  .category-card,
  .calc-category,
  .calculator-link-card {
    min-height: auto;
  }

  .category-grid,
  .blog-grid {
    gap: 14px;
  }

  .post-card {
    padding: 16px;
  }

  .post-card h3 {
    font-size: 1.04rem;
    line-height: 1.3;
  }

  .post-card p {
    font-size: 0.94rem;
    line-height: 1.55;
  }

  .post-cover,
  .home-visual-card img,
  .hero-media img,
  .home-hero-media img {
    max-height: 260px;
    object-fit: cover;
  }

  .posts-section {
    scroll-margin-top: 92px;
  }

  .calculator-card-cover {
    width: calc(100% + 36px);
    margin: -18px -18px 8px;
  }

  .reference-tabs button {
    padding: 9px 8px;
    font-size: 0.86rem;
    line-height: 1.2;
  }

  .toolbar-menu {
    position: fixed;
    top: auto;
    right: 14px;
    bottom: 14px;
    left: 14px;
    width: auto;
    min-width: 0;
    max-height: min(70vh, 460px);
  }

  .toolbar-format-menu,
  .toolbar-insert-menu {
    min-width: 0;
  }

  .media-viewer {
    padding: 56px 14px 74px;
  }

  .media-viewer figure {
    max-height: calc(100vh - 130px);
  }

  .media-viewer img {
    max-height: calc(100vh - 190px);
  }

  .media-viewer-nav {
    top: auto;
    bottom: 14px;
    width: 42px;
    height: 42px;
    transform: none;
    font-size: 1.8rem;
  }

  .media-viewer-nav.previous {
    left: 14px;
  }

  .media-viewer-nav.next {
    right: 14px;
  }

  .media-viewer-actions {
    right: 64px;
    bottom: 14px;
    left: 64px;
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .section {
    width: min(100% - 24px, 1120px);
    padding: 56px 0;
  }

  .navbar {
    width: calc(100% - 24px);
    gap: 12px;
  }

  .header-actions {
    min-width: 0;
    gap: 6px;
  }

  body.mobile-search-open {
    position: fixed;
    width: 100%;
    overflow: hidden;
  }

  .site-search::before {
    content: "";
    position: fixed;
    inset: 68px 0 0;
    z-index: 90;
    background:
      radial-gradient(circle at 50% 42%, rgba(215, 25, 32, 0.08), transparent 24%),
      linear-gradient(180deg, rgba(15, 16, 19, 0.96), rgba(11, 12, 15, 0.985));
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.28s ease;
  }

  .site-search.is-open::before,
  .site-search:focus-within::before {
    opacity: 1;
    pointer-events: auto;
  }

  .site-search.is-open .site-search-field,
  .site-search:focus-within .site-search-field {
    position: fixed;
    top: 50dvh;
    bottom: auto;
    right: 16px;
    left: 16px;
    max-width: 440px;
    width: auto;
    margin: 0 auto;
    z-index: 96;
    opacity: 1;
    transform: translate3d(0, -50%, 0) scale(1);
  }

  .search-suggestions {
    position: fixed;
    top: calc(50dvh + 42px);
    bottom: auto;
    right: 16px;
    left: 16px;
    max-width: 440px;
    width: auto;
    margin: 0 auto;
    z-index: 96;
    max-height: min(30vh, 260px);
    overflow-y: auto;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 0;
    border-radius: 0 0 20px 20px;
    background:
      linear-gradient(180deg, rgba(24, 25, 29, 0.99), rgba(17, 18, 22, 0.985));
    box-shadow:
      0 26px 52px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .site-search-field input {
    min-height: 58px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    color: #ffffff;
    background:
      linear-gradient(180deg, rgba(36, 37, 42, 0.98), rgba(22, 23, 27, 0.98));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 20px 36px rgba(0, 0, 0, 0.28),
      0 0 0 1px rgba(215, 25, 32, 0.18);
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: 0.01em;
  }

  .site-search-field input::placeholder {
    color: rgba(255, 255, 255, 0.72);
  }

  .site-search.is-open .site-search-toggle,
  .site-search:focus-within .site-search-toggle {
    border-color: rgba(255, 255, 255, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 26px rgba(0, 0, 0, 0.18);
    transform: none;
    filter: none;
  }

  .site-search.is-open .search-suggestions a,
  .site-search.is-open .search-suggestions p,
  .site-search:focus-within .search-suggestions a,
  .site-search:focus-within .search-suggestions p {
    color: #f4f4f5;
  }

  .site-search.is-open .search-suggestions a:hover,
  .site-search:focus-within .search-suggestions a:hover {
    background: rgba(215, 25, 32, 0.16);
  }

  .site-search.is-open .search-suggestions em,
  .site-search.is-open .search-suggestions p,
  .site-search:focus-within .search-suggestions em,
  .site-search:focus-within .search-suggestions p {
    color: #c8cad0;
  }

  .site-search.is-open .search-suggestions img,
  .site-search.is-open .search-suggestion-placeholder,
  .site-search:focus-within .search-suggestions img,
  .site-search:focus-within .search-suggestion-placeholder {
    background: #27272a;
    border-color: #3f3f46;
  }

  .turnstile-field {
    margin-top: 14px;
  }

  .turnstile-widget {
    transform-origin: left top;
  }

  .theme-toggle,
  .menu-toggle {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 14px;
  }

  .wiki-canvas {
    font-size: 1rem;
  }

  .wiki-media.align-left,
  .wiki-media.align-right {
    float: none;
    width: min(320px, 100%);
    max-width: 100%;
    margin: 16px auto;
  }

  .wiki-canvas .wiki-media.align-free {
    left: auto !important;
    top: auto !important;
    position: static;
    width: min(320px, 100%) !important;
    max-width: 100%;
    margin: 16px auto;
  }

  .article-body .wiki-media.align-free {
    position: static;
    width: min(320px, 100%) !important;
    max-width: 100%;
    margin: 16px auto;
  }

  .media-size-control {
    grid-template-columns: 1fr;
  }

  .logo {
    font-size: 1.2rem;
  }

  .login-button {
    max-width: 38vw;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.calculator-detail-page .page-hero,
  body:has(#calculator-detail-root) .page-hero {
    width: min(100% - 24px, 640px);
    padding-top: 34px;
  }

  .calc-field,
  .calc-time-field {
    grid-template-columns: minmax(0, 1fr) minmax(74px, auto);
  }

  .calc-value-box {
    min-width: 74px;
    padding: 10px;
    font-size: 0.96rem;
  }

  .calc-time-grid {
    grid-template-columns: 1fr;
  }

  .time-input-row.calc-time-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1,
  .page-hero h1 {
    font-size: clamp(1.9rem, 11vw, 2.35rem);
  }

  .hero-text,
  .page-hero p:not(.eyebrow) {
    font-size: 1rem;
  }

  .section-heading p:not(.eyebrow) {
    font-size: 0.98rem;
  }

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

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

  .home-visual-card {
    grid-template-rows: 190px 1fr;
  }

  .home-visual-card img,
  .post-cover,
  .hero-media img,
  .home-hero-media img {
    max-height: 220px;
  }

  .toolbar-menu {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    min-width: 0;
    max-height: min(70vh, 460px);
  }

  .toolbar-format-menu,
  .toolbar-insert-menu {
    min-width: 0;
  }

  .reference-tabs {
    grid-template-columns: 1fr;
  }

  .article-appearance .article-toolbar,
  .article-appearance fieldset {
    grid-template-columns: 1fr;
  }

  .hero-panel div {
    padding-right: 0;
    padding-bottom: 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .hero-panel div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .hero-actions,
  .article-toolbar,
  .editor-actions,
  .media-actions,
  .footer {
    flex-direction: column;
  }

  .footer-legal {
    flex: 0 0 auto;
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }

  .social-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .message {
    max-width: 92%;
  }

  .message-person {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .message-person-row {
    grid-template-columns: 1fr;
  }

  .message-profile-link {
    min-height: 40px;
  }

  .message-person img {
    width: 38px;
    height: 38px;
  }

  .btn {
    width: 100%;
  }

  .btn:hover {
    transform: translateY(-1px) scale(1.01);
  }

  .footer {
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .section {
    width: min(100% - 20px, 1120px);
    padding: 44px 0;
  }

  .split-section > *,
  .posts-section > *,
  .calculators-section > *,
  .calculator-feature-text,
  .calculator-feature-grid,
  .home-feature-posts,
  .home-blog-strip .section-heading,
  .home-blog-actions {
    width: calc(100% - 20px);
  }

  .navbar {
    width: calc(100% - 18px);
    gap: 8px;
  }

  .logo {
    font-size: 1.08rem;
  }

  .theme-toggle,
  .menu-toggle {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .login-button {
    max-width: 35vw;
    min-height: 38px;
    padding: 8px;
    font-size: 0.78rem;
  }

  .site-search.is-open .site-search-field,
  .site-search:focus-within .site-search-field {
    top: 72px;
    right: 10px;
    left: 10px;
  }

  .search-suggestions {
    top: 122px;
    right: 10px;
    left: 10px;
    max-height: min(50vh, 320px);
  }

  .nav-links {
    padding: 14px;
    max-height: calc(100vh - 86px);
    overflow-y: auto;
  }

  .nav-links a {
    min-height: 48px;
    padding: 12px 14px;
  }

  .nav-dropdown.is-expanded .nav-submenu {
    max-height: 260px;
  }

  .hero-content h1,
  .page-hero h1 {
    font-size: 1.9rem;
  }

  .section-heading h2,
  .calculator-feature-text h2 {
    font-size: 1.55rem;
  }

  .home-visual-card div,
  .calculator-feature-grid div,
  .feature-card,
  .category-card,
  .post-card,
  .calculator-card,
  .calculator-link-card,
  .calculator-info-block,
  .social-panel,
  .editor-form,
  .profile-form,
  .wiki-note,
  .profile-preview,
  .auth-box {
    padding: 16px;
  }

  .wide-editor .editor-form {
    padding: 16px;
  }

  .post-card h3,
  .category-card h3 {
    font-size: 1rem;
  }

  .post-card p,
  .category-card p {
    font-size: 0.92rem;
  }

  .download-library-card-image {
    width: calc(100% + 32px);
    margin: -16px -16px 16px;
    border-radius: 16px 16px 0 0;
  }

  .turnstile-widget {
    transform: scale(0.94);
  }

  .calculator-card-cover {
    width: calc(100% + 32px);
    margin: -16px -16px 8px;
  }

  .wiki-canvas {
    min-height: 420px;
    padding: 16px;
  }

  .auth-modal {
    padding: 10px;
  }

  .auth-box {
    width: min(100%, calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
  }

}

@media (max-width: 760px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }

  .social-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .social-tabs .btn {
    width: auto;
    flex: 0 0 auto;
    min-width: max-content;
    scroll-snap-align: start;
  }

  .social-layout .social-panel.is-active,
  .social-layout .messages-panel.is-active {
    width: 100%;
    max-width: 100%;
  }

  .messages-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  #message-people-list {
    display: grid;
    gap: 8px;
    max-height: 34vh;
    overflow: auto;
    padding-right: 2px;
  }

  .message-conversation {
    grid-template-rows: minmax(280px, 52vh) auto auto;
  }

  #message-thread {
    min-height: 280px;
    max-height: 52vh;
    border-radius: 14px;
  }

  .friend-search-card {
    grid-template-columns: 46px 1fr;
  }

  .friend-search-card .friend-row-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .friend-row-actions .btn {
    flex: 1 1 140px;
  }
}

@media (max-width: 560px) {
  .social-tabs .btn {
    width: auto;
  }

  .message-person-row {
    grid-template-columns: 1fr;
  }

  .message-profile-link {
    width: 100%;
  }

  .message {
    max-width: 94%;
  }
}

@media print {
  .site-header,
  .footer,
  .no-print {
    display: none !important;
  }

  body {
    color: #000000;
    background: #ffffff;
  }

  .section,
  .article-page {
    width: 100%;
    max-width: none;
    padding: 0;
  }
}

.pdf-exporting .no-print {
  display: none !important;
}

.pdf-export-holder {
  position: fixed;
  left: 0;
  top: 0;
  z-index: -1;
  width: 190mm;
  background: #ffffff;
  opacity: 1;
  pointer-events: none;
}

.pdf-document {
  width: 190mm;
  max-width: none;
  padding: 0;
  color: #111111;
  background: #ffffff;
  font-family: Georgia, "Times New Roman", Times, serif;
  overflow-wrap: normal;
  word-break: break-word;
}

.pdf-document,
.pdf-document * {
  color: #111111 !important;
}

.pdf-document .pdf-brand-header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: #111111 !important;
  font-family: Georgia, "Times New Roman", Times, serif;
}

.pdf-document .pdf-brand-mark {
  width: 46px;
  height: 46px;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
}

.pdf-document .pdf-brand-text {
  display: grid;
  gap: 0;
  line-height: 1;
}

.pdf-document .pdf-brand-text strong {
  color: #111111 !important;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 17px;
  font-variant: small-caps;
  font-weight: 500;
  letter-spacing: 0.16em;
}

.pdf-document .pdf-brand-text small {
  color: #111111 !important;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 7.5px;
  letter-spacing: 0.02em;
}

.pdf-document .eyebrow {
  margin: 0 0 4px;
  color: #111111 !important;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.pdf-document h1 {
  margin: 0 0 12px;
  padding-bottom: 5px;
  border-bottom: 2px solid #111111;
  color: #111111;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: normal;
  word-break: break-word;
}

.pdf-document .article-summary {
  margin: 0 0 12px;
  color: #111111 !important;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 11px;
  line-height: 1.42;
  overflow-wrap: normal;
  word-break: break-word;
}

.pdf-document .article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 22px;
}

.pdf-document .article-author-card,
.pdf-document .article-contributors {
  max-width: 100%;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.pdf-document .article-author-card {
  min-height: 58px;
  padding: 10px 12px;
}

.pdf-document .article-contributors summary {
  min-height: 58px;
  padding: 10px 12px;
}

.pdf-document .article-contributors ul {
  padding: 0 12px 12px;
}

.pdf-document .article-person-avatar {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.pdf-document .article-meta-label,
.pdf-document .article-person-id,
.pdf-document .article-contributor-note,
.pdf-document .article-contributor-empty {
  font-size: 11px;
}

.pdf-document .article-body {
  margin-top: 12px;
  padding-top: 0;
  border-top: 0;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 11px;
  line-height: 1.46;
  overflow-wrap: normal;
  word-break: break-word;
}

.pdf-document .article-body p,
.pdf-document .references li {
  color: #111111;
  font-size: 11px;
  line-height: 1.46;
  overflow-wrap: normal;
  word-break: break-word;
}

.pdf-document .article-body h1,
.pdf-document .article-body h2,
.pdf-document .article-body h3,
.pdf-document .article-body h4,
.pdf-document .article-body h5,
.pdf-document .article-body h6,
.pdf-document .references h2 {
  break-after: avoid;
  page-break-after: avoid;
  color: #111111;
  font-family: Georgia, "Times New Roman", Times, serif;
  line-height: 1.18;
}

.pdf-document .article-body h1 {
  font-size: 21px;
}

.pdf-document .article-body h2,
.pdf-document .references h2 {
  margin-top: 22px;
  padding-bottom: 4px;
  border-bottom: 2px solid #111111;
  font-size: 19px;
}

.pdf-document .article-body h3 {
  font-size: 14px;
}

.pdf-document .article-body h4 {
  font-size: 12.5px;
}

.pdf-document .article-body h5 {
  font-size: 11.5px;
}

.pdf-document .article-body h6 {
  font-size: 10.8px;
}

.pdf-document figure,
.pdf-document table,
.pdf-document blockquote,
.pdf-document .references li {
  break-inside: avoid;
  page-break-inside: avoid;
}

.pdf-document img {
  max-width: 100%;
  max-height: 96mm;
  object-fit: contain;
}

.pdf-document table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 10px;
  overflow-wrap: normal;
  word-break: break-word;
}

.pdf-document th,
.pdf-document td {
  border: 1px solid #a2a9b1;
  padding: 6px;
  overflow-wrap: normal;
  word-break: break-word;
}

.pdf-document th {
  background: #eaecf0;
  font-weight: 700;
}

.pdf-document blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 4px solid #d71920;
  background: #f6f6f7;
}

.pdf-document figure figcaption,
.pdf-document .wiki-media figcaption,
.pdf-document table caption {
  color: #111111 !important;
  font-size: 9.5px;
}

.pdf-document .pdf-image-placeholder {
  margin: 10px 0;
  padding: 8px 10px;
  border: 1px solid #dddddd;
  background: #f6f6f7;
  color: #111111 !important;
  font-size: 9.5px;
}

.pdf-document .references {
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px solid #e4e4e7;
}

.pdf-document .references ol {
  columns: 1;
  padding-left: 18px;
}

@media (max-width: 1180px) {
  body.mobile-menu-open {
    overflow: hidden;
  }

  .site-header {
    overflow: visible;
  }

  .navbar {
    position: relative;
    align-items: center;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: 0;
    z-index: 70;
    display: flex;
    margin: 0;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    background:
      linear-gradient(180deg, rgba(18, 18, 22, 0.985), rgba(9, 9, 13, 0.965));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 28px 54px rgba(0, 0, 0, 0.38);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-14px);
    transform-origin: top center;
    transition:
      opacity 0.24s ease,
      transform 0.36s cubic-bezier(0.16, 1, 0.3, 1),
      visibility 0.24s ease;
  }

  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    animation: mobileMenuPanelSlide 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .nav-links.is-closing {
    opacity: 0;
    visibility: visible;
    pointer-events: none;
    transform: translateY(-12px) scale(0.985);
    animation: mobileMenuPanelClose 0.28s ease both;
  }

  .nav-links > li {
    width: 100%;
    opacity: 0;
    transform: translateY(-14px);
  }

  .nav-links.is-open > li {
    animation: mobileMenuItemDrop 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--menu-item-index, 0) * 72ms);
  }

  .nav-links.is-closing > li {
    animation: mobileMenuItemLift 0.22s ease both;
  }

  .nav-links a {
    width: 100%;
    justify-content: space-between;
    min-height: 54px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  .nav-links a:hover,
  .nav-links a:focus-visible {
    transform: translateX(4px);
  }

  .nav-submenu {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .nav-dropdown.is-expanded .nav-submenu {
    margin-top: 10px;
  }

  .nav-submenu a {
    min-height: 54px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  @keyframes mobileMenuPanelSlide {
    from {
      opacity: 0;
      transform: translateY(-18px) scale(0.985);
    }

    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  @keyframes mobileMenuItemDrop {
    from {
      opacity: 0;
      transform: translateY(-14px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes mobileMenuPanelClose {
    from {
      opacity: 1;
      transform: translateY(0) scale(1);
    }

    to {
      opacity: 0;
      transform: translateY(-12px) scale(0.985);
    }
  }

  @keyframes mobileMenuItemLift {
    from {
      opacity: 1;
      transform: translateY(0);
    }

    to {
      opacity: 0;
      transform: translateY(-8px);
    }
  }
}

@media (max-width: 560px) {
  .nav-links {
    top: calc(100% + 10px);
    padding: 14px;
    border-radius: 24px;
  }
}

@media (max-width: 1180px) {
  .header-social-links .site-social-link {
    width: 40px;
    min-height: 40px;
    border-radius: 14px;
  }

  .header-social-links .site-social-link svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 760px) {
  .header-social-links {
    display: none;
  }

  .hero-social-links,
  .footer-social-links {
    justify-content: flex-start;
    width: 100%;
    margin-left: 0;
  }

  .hero-social-links .site-social-link,
  .footer-social-links .site-social-link {
    flex: 1 1 132px;
  }
}

@media (max-width: 420px) {
  .hero-social-label {
    flex: 0 0 100%;
  }

  .hero-social-links .site-social-link,
  .footer-social-links .site-social-link {
    flex-basis: 100%;
  }
}

body.search-overlay-open {
  overflow: hidden;
}

body.search-overlay-open .site-search::before {
  content: "";
  position: fixed;
  inset: 74px 0 0;
  z-index: 88;
  background:
    radial-gradient(circle at 50% 46%, rgba(215, 25, 32, 0.08), transparent 28%),
    rgba(12, 13, 16, 0.9);
  opacity: 1;
  pointer-events: auto;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: searchOverlayFade 0.26s ease both;
}

body.search-overlay-open .site-search.is-open .site-search-field,
body.search-overlay-open .site-search:focus-within .site-search-field {
  position: fixed;
  top: 50dvh;
  right: 32px;
  left: 32px;
  z-index: 96;
  width: min(1260px, calc(100vw - 64px));
  max-width: 1260px;
  margin: 0 auto;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
  animation: searchPanelRise 0.34s cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.search-overlay-open .site-search-field input {
  min-height: clamp(48px, 6.2vw, 88px);
  padding: 0 clamp(58px, 6vw, 92px) 0 clamp(22px, 3.4vw, 58px);
  border: 1px solid var(--red);
  border-radius: 0;
  color: #ffffff;
  background: rgba(12, 13, 16, 0.72);
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(215, 25, 32, 0.16);
  font-size: clamp(1rem, 2.45vw, 2.15rem);
  font-weight: 500;
}

body.search-overlay-open .site-search-field input::placeholder {
  color: rgba(255, 255, 255, 0.92);
}

body.search-overlay-open .site-search.is-open .site-search-toggle,
body.search-overlay-open .site-search:focus-within .site-search-toggle {
  position: fixed;
  top: calc(50dvh - 28px);
  right: max(42px, calc((100vw - 1260px) / 2 + 42px));
  z-index: 97;
  width: 58px;
  min-height: 58px;
  border: 0;
  color: #ffffff;
  background: transparent;
  box-shadow: none;
  transform: none;
  filter: none;
}

body.search-overlay-open .site-search.is-open .site-search-toggle:hover,
body.search-overlay-open .site-search.is-open .site-search-toggle:focus-visible {
  color: #ff747a;
  background: transparent;
  box-shadow: none;
  transform: scale(1.04);
}

body.search-overlay-open .site-search.is-open .site-search-toggle svg,
body.search-overlay-open .site-search:focus-within .site-search-toggle svg {
  width: clamp(22px, 2.8vw, 36px);
  height: clamp(22px, 2.8vw, 36px);
  stroke-width: 2.2;
}

body.search-overlay-open .search-suggestions {
  position: fixed;
  top: calc(50dvh + clamp(28px, 3.4vw, 50px));
  right: 32px;
  left: 32px;
  z-index: 96;
  width: min(1260px, calc(100vw - 64px));
  max-width: 1260px;
  max-height: min(30vh, 320px);
  margin: 0 auto;
  overflow-y: auto;
  border: 1px solid rgba(215, 25, 32, 0.58);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  color: #f5f5f7;
  background: rgba(14, 15, 19, 0.96);
  box-shadow: 0 26px 52px rgba(0, 0, 0, 0.42);
}

body.search-overlay-open .search-suggestions a,
body.search-overlay-open .search-suggestions p {
  color: #f5f5f7;
}

body.search-overlay-open .search-suggestions em,
body.search-overlay-open .search-suggestions p {
  color: #c8cad0;
}

body.search-overlay-open .search-suggestions a:hover {
  background: rgba(215, 25, 32, 0.16);
}

@keyframes searchOverlayFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes searchPanelRise {
  from {
    opacity: 0;
    transform: translateY(calc(-50% + 24px)) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

@media (max-width: 760px) {
  body.search-overlay-open .site-search::before {
    inset: 40px 0 0;
    background: rgba(12, 13, 16, 0.94);
  }

  body.search-overlay-open .site-search.is-open .site-search-field,
  body.search-overlay-open .site-search:focus-within .site-search-field {
    top: 50dvh;
    right: 26px;
    left: 26px;
    width: auto;
  }

  body.search-overlay-open .site-search-field input {
    min-height: 46px;
    padding: 0 54px 0 22px;
    font-size: 1rem;
    font-weight: 700;
  }

  body.search-overlay-open .site-search.is-open .site-search-toggle,
  body.search-overlay-open .site-search:focus-within .site-search-toggle {
    top: calc(50dvh - 20px);
    right: 38px;
    width: 40px;
    min-height: 40px;
  }

  body.search-overlay-open .search-suggestions {
    top: calc(50dvh + 24px);
    right: 26px;
    left: 26px;
    width: auto;
    max-height: min(34vh, 280px);
  }
}

@media (max-width: 760px) {
  .article-reading-layout,
  body[data-article-width="wide"] .article-reading-layout {
    width: min(100% - 10px, 760px);
  }

  .article-page.section {
    padding-top: 28px;
  }

  .article-mobile-rail {
    top: 52px;
    right: 8px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .article-page h1 {
    max-width: calc(100% - 48px);
    font-size: clamp(2.35rem, 11vw, 3.05rem);
    line-height: 1.05;
  }

  .article-summary {
    font-size: 1rem;
    line-height: 1.55;
  }

  .article-body {
    color: var(--black);
    font-size: clamp(1rem, 4.2vw, 1.08rem);
    line-height: 1.75;
    overflow: visible;
  }

  .article-body p,
  .article-body li {
    color: inherit !important;
  }

  .article-body :where(span, font, strong, em, u, s, small, mark, label, dt, dd, figcaption, caption) {
    color: inherit !important;
  }

  body.dark-mode .article-body {
    color: #f2f2f5;
  }
}

@media (max-width: 420px) {
  .article-reading-layout,
  body[data-article-width="wide"] .article-reading-layout {
    width: calc(100% - 8px);
  }

  .article-page h1 {
    font-size: clamp(2.15rem, 10.5vw, 2.8rem);
  }
}

.social-layout .social-panel.is-active {
  max-width: min(1120px, calc(100% - 20px));
}

.section.social-layout {
  width: min(1480px, calc(100% - 32px));
}

.social-layout .messages-panel.is-active {
  max-width: min(1460px, calc(100% - 20px));
}

.social-panel {
  border-radius: 24px;
  border-color: rgba(11, 11, 13, 0.08);
  box-shadow:
    0 26px 70px rgba(11, 11, 13, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

body.dark-mode .social-panel {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.presence-avatar {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 56px;
  height: 56px;
}

.presence-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 24px rgba(11, 11, 13, 0.12);
}

.presence-avatar i {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--panel);
  border-radius: 999px;
  background: #9ca3af;
}

.presence-avatar i.is-online {
  background: #20c76a;
  box-shadow: 0 0 0 4px rgba(32, 199, 106, 0.14);
}

.group-chat-avatar {
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(215, 25, 32, 0.95), rgba(22, 24, 32, 0.95));
  color: #fff;
  font-size: 0.82rem;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(11, 11, 13, 0.14);
}

.friend-row {
  grid-template-columns: 60px minmax(0, 1fr) repeat(5, auto);
  gap: 12px;
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid rgba(11, 11, 13, 0.08);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 247, 249, 0.9));
}

body.dark-mode .friend-row {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
}

.friend-row > img {
  width: 56px;
  height: 56px;
}

.friend-row strong {
  display: block;
  font-size: 1rem;
}

.friend-row .btn,
.friend-row .message-profile-link {
  min-height: 40px;
  border-radius: 12px;
}

.blocked-users-panel {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.blocked-users-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.blocked-users-heading h3 {
  margin: 0;
}

.blocked-users-heading span {
  color: var(--gray);
  font-size: 0.9rem;
}

.blocked-user-row {
  grid-template-columns: 60px minmax(0, 1fr) auto;
}

.messages-layout {
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
  gap: 22px;
  min-height: 680px;
}

.message-people {
  padding: 12px;
  border: 1px solid rgba(11, 11, 13, 0.08);
  border-radius: 24px;
  background: var(--off-white);
}

body.dark-mode .message-people {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.message-person-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  margin-bottom: 8px;
}

.message-person {
  grid-template-columns: 56px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  min-height: 82px;
  padding: 12px;
  border-radius: 20px;
  background: var(--panel);
}

body.dark-mode .message-person {
  background: rgba(255, 255, 255, 0.055);
}

.message-person .presence-avatar {
  grid-row: 1 / 4;
  width: 52px;
  height: 52px;
}

.message-person-title,
.message-person small {
  grid-column: 2;
}

.message-person small + small {
  margin-top: -2px;
  color: color-mix(in srgb, var(--gray) 82%, var(--black));
}

.message-profile-link {
  border-radius: 16px;
  background: var(--panel);
}

.message-conversation {
  grid-template-rows: minmax(440px, 1fr) auto auto auto;
  gap: 12px;
}

#message-thread {
  min-height: 440px;
  max-height: 640px;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 247, 249, 0.92));
}

body.dark-mode #message-thread {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.03));
  border-color: rgba(255, 255, 255, 0.08);
}

.chat-head {
  top: -18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: -18px -18px 18px;
  padding: 14px 16px;
  border-radius: 24px 24px 0 0;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.chat-head-profile {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  color: var(--black);
}

.chat-head-profile:hover {
  color: var(--red);
}

.chat-avatar {
  width: 54px;
  height: 54px;
}

.chat-block-button {
  align-self: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--red);
  background: var(--panel);
  cursor: pointer;
  font-weight: 900;
}

.chat-warning {
  margin: 8px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(215, 25, 32, 0.22);
  border-radius: 16px;
  color: var(--red);
  background: rgba(215, 25, 32, 0.08);
  font-weight: 800;
}

.message {
  max-width: min(720px, 76%);
  padding: 12px 14px;
  border: 1px solid rgba(11, 11, 13, 0.07);
  border-radius: 22px 22px 22px 6px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(11, 11, 13, 0.06);
}

.message.mine {
  border-color: rgba(215, 25, 32, 0.12);
  border-radius: 22px 22px 6px 22px;
  background:
    linear-gradient(135deg, #f0444a 0%, var(--red) 55%, var(--red-dark) 100%);
}

body.dark-mode .message {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.075);
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.message-meta span {
  color: var(--gray);
  font-size: 0.76rem;
  font-weight: 800;
}

.message.mine .message-meta span {
  color: rgba(255, 255, 255, 0.78);
}

.message-meta button {
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  opacity: 0.78;
}

.message p {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}

.message a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.message-retracted {
  opacity: 0.76;
  font-style: italic;
}

.message-media {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  border-radius: 16px;
}

.message-media img {
  display: block;
  max-height: 320px;
  width: 100%;
  object-fit: cover;
}

.message-article-card {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  text-decoration: none !important;
}

.message:not(.mine) .message-article-card {
  border-color: rgba(11, 11, 13, 0.08);
  background: var(--off-white);
}

.message-article-card img {
  width: 84px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
}

.message-article-card strong,
.message-article-card small {
  display: block;
}

.message-article-card small {
  margin-top: 3px;
  opacity: 0.78;
}

.message-composer-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, auto));
  gap: 8px;
  align-items: center;
  justify-content: start;
}

.message-tool-button {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--black);
  background: var(--panel);
  font: inherit;
  font-weight: 900;
}

.message-tool-button {
  cursor: pointer;
}

.message-article-picker {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
}

.message-article-picker[hidden] {
  display: none;
}

.message-article-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#message-article-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  max-height: 300px;
  overflow: auto;
}

.article-picker-result {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--black);
  background: var(--off-white);
  cursor: pointer;
  text-align: left;
}

.article-picker-result:hover,
.article-picker-result:focus-visible {
  border-color: var(--red);
  box-shadow: 0 10px 22px rgba(215, 25, 32, 0.12);
}

.article-picker-result img,
.article-picker-placeholder {
  width: 76px;
  height: 58px;
  border-radius: 10px;
}

.article-picker-result img {
  object-fit: cover;
}

.article-picker-placeholder,
.group-avatar-placeholder {
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--red);
  font-weight: 900;
}

.article-picker-result strong,
.article-picker-result small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-picker-result small {
  display: -webkit-box;
  margin-top: 4px;
  color: var(--gray);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.group-create-panel,
.group-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--off-white);
}

.group-create-panel {
  margin-bottom: 18px;
}

.group-form-row {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  align-items: stretch;
}

.group-photo-picker {
  min-width: 0;
}

.group-photo-button {
  display: grid;
  min-height: 46px;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 7px 12px 7px 7px;
  border: 1px solid rgba(11, 11, 13, 0.1);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 247, 249, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  color: var(--ink);
  cursor: pointer;
}

.group-photo-button strong,
.group-photo-button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-photo-button small {
  color: var(--gray);
  font-size: 0.78rem;
  margin-top: 2px;
}

.group-photo-preview {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(215, 25, 32, 0.16), rgba(10, 132, 255, 0.12)),
    var(--panel);
  background-position: center;
  background-size: cover;
  color: var(--red);
  font-size: 1.35rem;
  font-weight: 800;
}

.group-invite-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

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

.group-invite-heading small {
  color: var(--gray);
  font-weight: 700;
}

.group-invite-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.group-invite-option {
  display: grid;
  grid-template-columns: 20px 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 247, 249, 0.9));
  box-shadow: 0 12px 28px rgba(11, 11, 13, 0.05);
  cursor: pointer;
}

.group-invite-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
}

.group-invite-option::after {
  content: "Davet et";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(215, 25, 32, 0.2);
  border-radius: 999px;
  background: rgba(215, 25, 32, 0.08);
  color: var(--red);
  font-weight: 800;
  white-space: nowrap;
}

.group-invite-option:has(input:checked) {
  border-color: rgba(215, 25, 32, 0.55);
  background: linear-gradient(180deg, rgba(255, 242, 243, 0.98), rgba(255, 232, 234, 0.94));
  box-shadow: 0 18px 38px rgba(215, 25, 32, 0.13);
}

.group-invite-option:has(input:checked)::after {
  content: "Se\00e7ildi";
  background: linear-gradient(180deg, var(--red), var(--red-dark));
  color: #fff;
}

.group-invite-option .presence-avatar {
  width: 48px;
  height: 48px;
}

.group-invite-option strong,
.group-invite-option small {
  display: block;
}

.group-invite-option small {
  color: var(--gray);
}

body.dark-mode .group-photo-button,
body.dark-mode .group-invite-option {
  background: #15161b;
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: none;
  color: #f5f5f5;
}

body.dark-mode .group-photo-preview {
  background:
    linear-gradient(135deg, rgba(244, 40, 51, 0.22), rgba(47, 128, 237, 0.16)),
    #202127;
}

body.dark-mode .group-invite-option:has(input:checked) {
  border-color: rgba(244, 40, 51, 0.7);
  background: #241317;
  box-shadow: 0 18px 38px rgba(215, 25, 32, 0.16);
}

body.dark-mode .group-invite-option::after {
  border-color: rgba(244, 40, 51, 0.3);
  background: rgba(244, 40, 51, 0.12);
}

@media (max-width: 720px) {
  .group-form-row {
    grid-template-columns: 1fr;
  }

  .group-invite-grid {
    grid-template-columns: 1fr;
  }

  .group-invite-option {
    grid-template-columns: 20px 48px minmax(0, 1fr);
  }

  .group-invite-option::after {
    grid-column: 2 / -1;
    width: 100%;
  }
}

#groups-list {
  display: grid;
  gap: 12px;
}

.group-card {
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
}

.group-card-media img,
.group-avatar-placeholder {
  width: 88px;
  height: 88px;
  border-radius: 16px;
}

.group-card-media img {
  object-fit: cover;
}

.group-card-body strong,
.group-card-body span {
  display: block;
}

.group-card-body p {
  margin: 5px 0;
  color: var(--gray);
}

.group-card-body span {
  color: var(--red);
  font-weight: 900;
}

.message-tool-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#message-input {
  min-height: 92px;
  padding: 14px;
  border-radius: 18px;
}

#send-message-button {
  justify-self: end;
  min-width: 168px;
}

@media (max-width: 980px) {
  .messages-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  #message-people-list {
    max-height: 38vh;
  }

  .message-conversation {
    grid-template-rows: minmax(340px, 54vh) auto auto auto;
  }

  #message-thread {
    min-height: 340px;
    max-height: 54vh;
  }
}

.exercise-atlas-page {
  background:
    linear-gradient(180deg, rgba(215, 25, 32, 0.04), transparent 360px),
    var(--white);
}

.exercise-atlas-hero {
  padding-bottom: 34px;
}

.exercise-search-wrap {
  display: grid;
  gap: 8px;
  width: min(620px, 100%);
  margin-top: 26px;
}

.exercise-search-wrap label {
  color: var(--gray);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.exercise-search-wrap input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid rgba(11, 11, 13, 0.14);
  border-radius: 8px;
  color: var(--black);
  background: var(--panel);
  box-shadow: 0 18px 42px rgba(11, 11, 13, 0.08);
  font: inherit;
  font-size: 1rem;
  font-weight: 750;
}

.exercise-search-wrap input:focus {
  outline: 3px solid rgba(215, 25, 32, 0.18);
  border-color: rgba(215, 25, 32, 0.45);
}

.atlas-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 0;
  padding-bottom: 22px;
}

.atlas-tabs button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.atlas-tabs button[aria-selected="true"] {
  box-shadow: 0 16px 32px rgba(215, 25, 32, 0.18);
}

.atlas-tab-panel[hidden] {
  display: none;
}

.anatomy-atlas-section {
  width: min(100%, calc(100% - 32px));
}

.anatomy-atlas-section .section-heading {
  width: min(1120px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.anatomy-layout,
.exercise-library-layout {
  display: grid;
  gap: 24px;
  align-items: start;
}

.anatomy-layout {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
}

.anatomy-layout.is-detail-open {
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
}

.exercise-library-layout {
  grid-template-columns: minmax(300px, 0.92fr) minmax(0, 1.08fr);
}

.anatomy-visual-card,
.muscle-detail-panel,
.exercise-detail-panel {
  border: 1px solid rgba(11, 11, 13, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 248, 250, 0.94)),
    var(--panel);
  box-shadow: 0 22px 54px rgba(11, 11, 13, 0.09);
}

.anatomy-visual-card {
  position: sticky;
  top: 96px;
  min-width: 0;
  overflow: hidden;
  min-height: calc(100vh - 128px);
  padding: 18px;
  background: #f7f7f8;
}

.anatomy-atlas-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(210px, 0.8fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.anatomy-control-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.anatomy-system-tabs button,
.anatomy-view-controls button,
.anatomy-layer-controls label,
.anatomy-overlay-toggle,
.anatomy-fullscreen-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(11, 11, 13, 0.12);
  border-radius: 8px;
  color: var(--black);
  background: rgba(255, 255, 255, 0.84);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.anatomy-system-tabs button.is-active,
.anatomy-view-controls button.is-active,
.anatomy-overlay-toggle.is-active,
.anatomy-fullscreen-toggle.is-active,
.anatomy-system-tabs button:hover,
.anatomy-system-tabs button:focus-visible,
.anatomy-view-controls button:hover,
.anatomy-view-controls button:focus-visible,
.anatomy-overlay-toggle:hover,
.anatomy-overlay-toggle:focus-visible,
.anatomy-fullscreen-toggle:hover,
.anatomy-fullscreen-toggle:focus-visible {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #ff5f66, var(--red));
  outline: none;
}

.anatomy-layer-controls {
  justify-content: center;
}

.anatomy-layer-controls label {
  gap: 7px;
}

.anatomy-system-tabs button:disabled,
.anatomy-layer-controls label.is-disabled {
  cursor: not-allowed;
  color: #6f737b;
  border-color: rgba(11, 11, 13, 0.1);
  background: rgba(255, 255, 255, 0.58);
  opacity: 0.58;
}

.anatomy-system-tabs button:disabled:hover,
.anatomy-system-tabs button:disabled:focus-visible {
  color: #6f737b;
  border-color: rgba(11, 11, 13, 0.1);
  background: rgba(255, 255, 255, 0.58);
}

.anatomy-soon-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--red);
  background: rgba(215, 25, 32, 0.1);
  font-size: 0.68rem;
  font-weight: 900;
}

.anatomy-layer-controls input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--red);
}

.anatomy-muscle-depth-control {
  display: grid;
  grid-template-columns: auto minmax(96px, 1fr) 56px;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(11, 11, 13, 0.12);
  border-radius: 8px;
  color: var(--black);
  background: rgba(255, 255, 255, 0.84);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.anatomy-muscle-depth-control input {
  width: 100%;
  accent-color: var(--red);
}

.anatomy-muscle-depth-control strong {
  color: var(--red);
  text-align: right;
}

.anatomy-view-labels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
  color: var(--gray);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.anatomy-map-hint {
  margin: 0 0 10px;
  color: #5f646d;
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.4;
}

.anatomy-plane-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid rgba(11, 11, 13, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.anatomy-plane-panel[hidden] {
  display: none;
}

.anatomy-plane-panel-head,
.anatomy-plane-control {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.anatomy-plane-panel-head strong {
  color: var(--black);
  font-size: 0.84rem;
  font-weight: 950;
}

.anatomy-plane-panel-head button,
.anatomy-plane-control button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(11, 11, 13, 0.12);
  border-radius: 8px;
  color: var(--black);
  background: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

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

.anatomy-plane-control {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(11, 11, 13, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.anatomy-plane-control label {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
  color: var(--black);
  font-size: 0.76rem;
  font-weight: 900;
}

.anatomy-plane-control label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.anatomy-plane-control input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  accent-color: var(--red);
}

.anatomy-plane-control button.is-active,
.anatomy-plane-control button:hover,
.anatomy-plane-control button:focus-visible,
.anatomy-plane-panel-head button:hover,
.anatomy-plane-panel-head button:focus-visible {
  color: #ffffff;
  border-color: transparent;
  background: var(--red);
  outline: none;
}

.anatomy-3d-viewer {
  position: relative;
  display: grid;
  height: calc(100vh - 250px);
  min-height: 580px;
  border: 1px solid rgba(11, 11, 13, 0.08);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 44%, rgba(215, 25, 32, 0.08), transparent 34%),
    linear-gradient(180deg, #f4f5f7, #e8eaee);
}

.anatomy-visual-card:fullscreen,
.anatomy-visual-card.is-anatomy-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  padding: 14px;
  overflow: auto;
  background: #f7f7f8;
}

.anatomy-visual-card:fullscreen .anatomy-atlas-toolbar,
.anatomy-visual-card.is-anatomy-fullscreen .anatomy-atlas-toolbar {
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.4fr) minmax(210px, 0.8fr) auto;
}

.anatomy-visual-card:fullscreen .anatomy-3d-viewer,
.anatomy-visual-card.is-anatomy-fullscreen .anatomy-3d-viewer {
  height: auto;
  min-height: 0;
}

.anatomy-3d-viewer canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  cursor: grab;
  touch-action: none;
}

.anatomy-3d-viewer.is-dragging canvas {
  cursor: grabbing;
}

.anatomy-focus-bar {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 14px;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(220px, 1.2fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(11, 11, 13, 0.1);
  border-radius: 8px;
  color: #252932;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 34px rgba(11, 11, 13, 0.1);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.anatomy-focus-bar[hidden] {
  display: none;
}

.anatomy-focus-name {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.anatomy-focus-name span,
.anatomy-focus-range span {
  color: #6a6f79;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
}

.anatomy-focus-name strong {
  overflow: hidden;
  color: #111318;
  font-size: 0.84rem;
  font-weight: 950;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.anatomy-focus-subparts {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding-top: 4px;
}

.anatomy-focus-subparts[hidden] {
  display: none;
}

.anatomy-focus-subparts > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.anatomy-focus-subparts em {
  max-width: 130px;
  padding: 3px 6px;
  overflow: hidden;
  border: 1px solid rgba(11, 11, 13, 0.09);
  border-radius: 999px;
  color: #333741;
  background: rgba(255, 255, 255, 0.68);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.anatomy-focus-range {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.anatomy-focus-range input {
  width: 100%;
  accent-color: var(--red);
}

.anatomy-focus-bar button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(215, 25, 32, 0.22);
  border-radius: 8px;
  color: var(--red);
  background: rgba(215, 25, 32, 0.08);
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.anatomy-focus-bar button:hover,
.anatomy-focus-bar button:focus-visible {
  color: #ffffff;
  border-color: transparent;
  background: var(--red);
  outline: none;
}

.anatomy-3d-actions {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.anatomy-3d-actions button {
  display: grid;
  place-items: center;
  min-width: 38px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(11, 11, 13, 0.12);
  border-radius: 999px;
  color: var(--black);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 900;
}

.anatomy-3d-actions button:hover,
.anatomy-3d-actions button:focus-visible {
  color: #ffffff;
  border-color: transparent;
  background: var(--red);
  outline: none;
}

.anatomy-3d-status {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(11, 11, 13, 0.1);
  border-radius: 8px;
  color: #30343b;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 34px rgba(11, 11, 13, 0.1);
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.35;
  pointer-events: none;
}

.anatomy-3d-viewer.is-ready .anatomy-3d-status {
  display: none;
}

.anatomy-3d-viewer.is-model-missing .anatomy-3d-status {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}

.anatomy-visual-card:not(.is-3d-ready) .anatomy-3d-viewer {
  display: grid;
}

.anatomy-visual-card .muscle-map,
.anatomy-visual-card .anatomy-view-labels {
  display: none;
}

.muscle-map {
  display: block;
  width: 100%;
  height: calc(100vh - 220px);
  min-height: 520px;
}

.anatomical-map {
  max-height: none;
}

.body-silhouette circle,
.body-silhouette path {
  fill: #f1f2f4;
  stroke: #252a31;
  stroke-width: 1.7;
}

.body-silhouette .silhouette-line {
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
}

.muscle-hotspot {
  cursor: pointer;
  outline: none;
}

.muscle-hotspot path {
  fill: #e4e5e8;
  stroke: #252a31;
  stroke-width: 1.6;
  transition: fill 0.2s ease, filter 0.2s ease, stroke 0.2s ease;
}

.muscle-hotspot-small path {
  fill: rgba(232, 232, 234, 0.82);
  stroke-width: 1.25;
}

.muscle-hotspot text {
  display: none;
  fill: #ffffff;
  font-family: "Inter", Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  text-anchor: middle;
  pointer-events: none;
}

.muscle-hotspot .atlas-label {
  paint-order: stroke;
  stroke: rgba(11, 11, 13, 0.52);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.muscle-hotspot .atlas-label-start {
  text-anchor: start;
}

.muscle-hotspot .atlas-label-end {
  text-anchor: end;
}

.muscle-hotspot .atlas-label-center {
  text-anchor: middle;
}

.muscle-hotspot .atlas-leader {
  display: none;
  stroke: rgba(215, 25, 32, 0.72);
  stroke-width: 1.8;
  stroke-linecap: round;
  pointer-events: none;
}

.muscle-hotspot:hover text,
.muscle-hotspot:focus-visible text,
.muscle-hotspot.is-active text,
.muscle-hotspot:hover .atlas-leader,
.muscle-hotspot:focus-visible .atlas-leader,
.muscle-hotspot.is-active .atlas-leader {
  display: block;
}

.muscle-hotspot:hover path,
.muscle-hotspot:focus-visible path,
.muscle-hotspot.is-active path {
  fill: #ff4f62;
  stroke: #ad1018;
  filter: drop-shadow(0 10px 14px rgba(215, 25, 32, 0.22));
}

.muscle-detail-panel,
.exercise-detail-panel {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 24px;
}

.muscle-detail-panel {
  max-height: calc(100vh - 128px);
  overflow: auto;
}

.muscle-detail-panel[hidden] {
  display: none;
}

.muscle-detail-close {
  position: sticky;
  top: 0;
  justify-self: end;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: -8px -8px -8px 0;
  border: 1px solid rgba(11, 11, 13, 0.12);
  border-radius: 999px;
  color: var(--black);
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font: inherit;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  z-index: 2;
}

.muscle-detail-close:hover,
.muscle-detail-close:focus-visible {
  color: #ffffff;
  border-color: transparent;
  background: var(--red);
  outline: none;
}

.detail-kicker {
  width: max-content;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 6px;
  color: #ffffff;
  background: var(--red);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.muscle-detail-panel h3,
.exercise-detail-panel h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1.08;
}

.detail-subtitle {
  margin: -8px 0 0;
  color: var(--gray);
  font-weight: 800;
}

.atlas-definition-list,
.exercise-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.atlas-definition-list div,
.exercise-card dl div {
  min-width: 0;
}

.atlas-definition-list dt,
.exercise-card dt {
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.atlas-definition-list dd,
.exercise-card dd {
  margin: 2px 0 0;
  color: var(--black);
  overflow-wrap: anywhere;
}

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

.detail-columns-wide {
  align-items: start;
}

.muscle-detail-panel h4,
.exercise-detail-panel h4 {
  margin: 0 0 8px;
  font-size: 0.92rem;
}

.muscle-detail-panel ul,
.exercise-detail-panel ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.related-exercise-strip div,
.worked-muscle-list div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.related-exercise-strip button,
.worked-muscle-list button,
.exercise-filter-bar button,
.exercise-card button {
  min-height: 36px;
  border: 1px solid rgba(215, 25, 32, 0.18);
  border-radius: 8px;
  color: var(--black);
  background: rgba(215, 25, 32, 0.06);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 850;
}

.related-exercise-strip button,
.exercise-filter-bar button,
.exercise-card button {
  padding: 7px 11px;
}

.worked-muscle-list button {
  display: grid;
  gap: 2px;
  min-width: min(210px, 100%);
  padding: 10px 12px;
  text-align: left;
}

.worked-muscle-list button span {
  color: var(--gray);
  font-size: 0.78rem;
}

.related-exercise-strip button:hover,
.worked-muscle-list button:hover,
.exercise-filter-bar button:hover,
.exercise-filter-bar button.is-active,
.exercise-card button:hover {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #ff5f66, var(--red));
}

.source-box {
  padding: 14px;
  border: 1px solid rgba(11, 11, 13, 0.08);
  border-radius: 8px;
  background: rgba(11, 11, 13, 0.03);
}

.clinical-note-box {
  padding: 14px;
  border-left: 4px solid var(--red);
  border-radius: 8px;
  background: rgba(215, 25, 32, 0.055);
}

.clinical-note-box p {
  margin: 0;
  color: var(--black);
  line-height: 1.5;
}

.muscle-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.muscle-card {
  display: grid;
  gap: 5px;
  min-height: 122px;
  padding: 16px;
  border: 1px solid rgba(11, 11, 13, 0.1);
  border-radius: 8px;
  color: var(--black);
  background: var(--panel);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 14px 32px rgba(11, 11, 13, 0.06);
}

.muscle-card span,
.exercise-card-head span {
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.muscle-card strong {
  font-size: 1rem;
  line-height: 1.2;
}

.muscle-card small {
  color: var(--gray);
  font-size: 0.84rem;
  font-weight: 750;
}

.muscle-card:hover,
.muscle-card.is-active,
.exercise-card:hover,
.exercise-card.is-active {
  border-color: rgba(215, 25, 32, 0.36);
  box-shadow: 0 20px 44px rgba(215, 25, 32, 0.12);
  transform: translateY(-2px);
}

.exercise-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

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

.exercise-card {
  display: grid;
  gap: 13px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(11, 11, 13, 0.1);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 36px rgba(11, 11, 13, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.exercise-card-head {
  display: grid;
  gap: 5px;
}

.exercise-card-head strong {
  font-size: 1.18rem;
  line-height: 1.15;
}

.exercise-card p,
.exercise-detail-panel p {
  margin: 0;
  color: var(--gray);
  overflow-wrap: anywhere;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  border: 1px dashed rgba(215, 25, 32, 0.28);
  border-radius: 8px;
  color: var(--gray);
  background: rgba(215, 25, 32, 0.04);
  font-weight: 750;
}

body.dark-mode .exercise-atlas-page {
  background:
    linear-gradient(180deg, rgba(215, 25, 32, 0.08), transparent 360px),
    var(--white);
}

body.dark-mode .exercise-search-wrap input,
body.dark-mode .anatomy-visual-card,
body.dark-mode .muscle-detail-panel,
body.dark-mode .exercise-detail-panel,
body.dark-mode .muscle-card,
body.dark-mode .exercise-card {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(26, 26, 32, 0.98), rgba(18, 18, 23, 0.96)),
    var(--panel);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.28);
}

body.dark-mode .body-silhouette circle,
body.dark-mode .body-silhouette path {
  fill: rgba(255, 255, 255, 0.045);
  stroke: rgba(255, 255, 255, 0.16);
}

body.dark-mode .atlas-definition-list dd,
body.dark-mode .exercise-card dd,
body.dark-mode .exercise-search-wrap input,
body.dark-mode .muscle-card,
body.dark-mode .exercise-card,
body.dark-mode .muscle-detail-close,
body.dark-mode .related-exercise-strip button,
body.dark-mode .worked-muscle-list button,
body.dark-mode .exercise-filter-bar button,
body.dark-mode .exercise-card button {
  color: #f3f3f5;
}

body.dark-mode .muscle-detail-close {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .source-box {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
}

body.dark-mode .anatomy-3d-viewer {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 246, 225, 0.055), transparent 32%),
    radial-gradient(circle at 50% 55%, rgba(215, 25, 32, 0.1), transparent 36%),
    linear-gradient(180deg, #18191f, #101116);
}

body.dark-mode .anatomy-focus-bar {
  color: #f3f3f5;
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(18, 18, 23, 0.78);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

body.dark-mode .anatomy-focus-name span,
body.dark-mode .anatomy-focus-range span {
  color: #aaaeb8;
}

body.dark-mode .anatomy-focus-name strong {
  color: #ffffff;
}

body.dark-mode .anatomy-focus-subparts em {
  color: #f3f3f5;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .anatomy-focus-bar button {
  color: #ff9da1;
  border-color: rgba(255, 95, 102, 0.28);
  background: rgba(255, 95, 102, 0.13);
}

body.dark-mode .anatomy-focus-bar button:hover,
body.dark-mode .anatomy-focus-bar button:focus-visible {
  color: #ffffff;
  border-color: transparent;
  background: var(--red);
}

body.dark-mode .anatomy-system-tabs button,
body.dark-mode .anatomy-view-controls button,
body.dark-mode .anatomy-layer-controls label,
body.dark-mode .anatomy-overlay-toggle,
body.dark-mode .anatomy-fullscreen-toggle,
body.dark-mode .anatomy-muscle-depth-control {
  color: #f3f3f5;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.09);
}

body.dark-mode .anatomy-muscle-depth-control strong {
  color: #ff8b90;
}

body.dark-mode .anatomy-system-tabs button.is-active,
body.dark-mode .anatomy-view-controls button.is-active,
body.dark-mode .anatomy-overlay-toggle.is-active,
body.dark-mode .anatomy-fullscreen-toggle.is-active,
body.dark-mode .anatomy-system-tabs button:hover,
body.dark-mode .anatomy-system-tabs button:focus-visible,
body.dark-mode .anatomy-view-controls button:hover,
body.dark-mode .anatomy-view-controls button:focus-visible,
body.dark-mode .anatomy-overlay-toggle:hover,
body.dark-mode .anatomy-overlay-toggle:focus-visible,
body.dark-mode .anatomy-fullscreen-toggle:hover,
body.dark-mode .anatomy-fullscreen-toggle:focus-visible {
  border-color: transparent;
  background: linear-gradient(135deg, #ff5f66, var(--red));
}

body.dark-mode .anatomy-plane-panel,
body.dark-mode .anatomy-plane-control {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

body.dark-mode .anatomy-plane-panel-head strong,
body.dark-mode .anatomy-plane-control label {
  color: #f3f3f5;
}

body.dark-mode .anatomy-plane-panel-head button,
body.dark-mode .anatomy-plane-control button {
  color: #f3f3f5;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.09);
}

body.dark-mode .anatomy-visual-card:fullscreen,
body.dark-mode .anatomy-visual-card.is-anatomy-fullscreen {
  background: #101116;
}

body.dark-mode .anatomy-system-tabs button:disabled,
body.dark-mode .anatomy-system-tabs button:disabled:hover,
body.dark-mode .anatomy-system-tabs button:disabled:focus-visible,
body.dark-mode .anatomy-layer-controls label.is-disabled {
  color: #9a9da6;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
}

body.dark-mode .anatomy-soon-badge {
  color: #ff9da1;
  background: rgba(255, 95, 102, 0.16);
}

body.dark-mode .anatomy-3d-status {
  color: #f3f3f5;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(18, 18, 23, 0.88);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}

body.dark-mode .clinical-note-box {
  background: rgba(215, 25, 32, 0.12);
}

body.dark-mode .clinical-note-box p {
  color: #f3f3f5;
}

@media (max-width: 1180px) {
  .anatomy-layout,
  .anatomy-layout.is-detail-open,
  .exercise-library-layout {
    grid-template-columns: 1fr;
  }

  .anatomy-visual-card,
  .muscle-detail-panel,
  .exercise-detail-panel {
    position: static;
  }

  .anatomy-atlas-toolbar {
    grid-template-columns: 1fr;
  }

  .anatomy-layer-controls,
  .anatomy-muscle-depth-control,
  .anatomy-view-controls {
    justify-content: flex-start;
  }

  .anatomy-muscle-depth-control {
    max-width: 420px;
  }

  .muscle-detail-panel {
    max-height: none;
  }

  .muscle-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .article-anatomy-stage,
  .article-anatomy-stage canvas {
    min-height: 360px;
    height: 360px;
  }

  .article-anatomy-toolbar {
    position: static;
    padding: 10px;
    background: #111217;
  }

  .article-anatomy-status {
    position: static;
    border-radius: 0;
  }

  .exercise-atlas-hero h1 {
    font-size: clamp(2.2rem, 11vw, 3rem);
  }

  .atlas-tabs .btn,
  .exercise-search-wrap,
  .exercise-filter-bar button {
    width: 100%;
  }

  .anatomy-visual-card {
    min-height: auto;
    padding: 12px;
  }

  .muscle-map {
    height: auto;
    min-height: 280px;
  }

  .anatomy-3d-viewer {
    height: 420px;
    min-height: 420px;
  }

  .anatomy-3d-viewer canvas {
    min-height: 420px;
  }

  .anatomy-focus-bar {
    left: 10px;
    right: 10px;
    top: 10px;
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 9px;
  }

  .anatomy-focus-name strong {
    white-space: normal;
  }

  .anatomy-system-tabs button,
  .anatomy-view-controls button,
  .anatomy-layer-controls label,
  .anatomy-overlay-toggle,
  .anatomy-fullscreen-toggle,
  .anatomy-muscle-depth-control {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }

  .anatomy-muscle-depth-control {
    grid-template-columns: 1fr;
    justify-items: stretch;
    text-align: left;
  }

  .anatomy-muscle-depth-control strong {
    text-align: left;
  }

  .anatomy-plane-control-list {
    grid-template-columns: 1fr;
  }

  .anatomy-plane-control {
    flex-wrap: wrap;
  }

  .muscle-hotspot text {
    font-size: 13px;
  }

  .detail-columns,
  .exercise-grid,
  .muscle-card-grid {
    grid-template-columns: 1fr;
  }

  .muscle-detail-panel,
  .exercise-detail-panel,
  .exercise-card,
  .muscle-card {
    padding: 16px;
  }
}

@media (max-width: 760px) {
  .social-layout .social-panel.is-active,
  .social-layout .messages-panel.is-active {
    max-width: 100%;
  }

  .social-panel {
    padding: 14px;
    border-radius: 20px;
  }

  .friend-row {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .friend-row .btn,
  .friend-row .message-profile-link,
  .blocked-user-row .btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .message-person-row {
    grid-template-columns: 1fr;
  }

  .message-profile-link {
    min-height: 38px;
  }

  .message {
    max-width: 92%;
  }

  .message-composer-tools {
    grid-template-columns: 1fr 1fr;
  }

  .message-article-card {
    grid-column: 1 / -1;
  }

  #send-message-button {
    width: 100%;
    justify-self: stretch;
  }
}

.navbar.has-open-search .header-actions,
.navbar:has(.site-search.is-open) .header-actions,
.navbar:has(.site-search:focus-within) .header-actions {
  min-width: 0;
}

@media (min-width: 1321px) {
  .navbar.has-open-search .nav-links,
  .navbar:has(.site-search.is-open) .nav-links,
  .navbar:has(.site-search:focus-within) .nav-links {
    gap: clamp(14px, 1.45vw, 24px);
  }
}

@media (min-width: 1181px) and (max-width: 1320px) {
  .navbar.has-open-search .nav-links,
  .navbar:has(.site-search.is-open) .nav-links,
  .navbar:has(.site-search:focus-within) .nav-links {
    gap: clamp(10px, 1vw, 16px);
  }
}

.auth-box,
.auth-form,
.auth-social-block,
.google-auth-wrap,
.google-auth-button {
  min-width: 0;
}

.google-auth-button iframe {
  max-width: 100% !important;
}

#download-library-grid .feature-card {
  overflow: hidden;
  transform: none;
}

/* 2026 social surface refresh */
.page-hero.section:has(+ .social-tabs) {
  width: min(1480px, calc(100% - 32px));
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(280px, 0.36fr);
  align-items: end;
  gap: clamp(22px, 4vw, 72px);
  padding-top: clamp(42px, 7vw, 92px);
  padding-bottom: 30px;
}

.page-hero.section:has(+ .social-tabs)::after {
  content: "Canlı sohbet\A Arkadaşlık\A Gruplar";
  white-space: pre-line;
  justify-self: end;
  width: min(100%, 340px);
  padding: 18px;
  border: 1px solid rgba(11, 11, 13, 0.08);
  border-radius: 22px;
  color: var(--gray);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(247, 247, 249, 0.72));
  box-shadow: 0 24px 70px rgba(11, 11, 13, 0.09);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.85;
}

body.dark-mode .page-hero.section:has(+ .social-tabs)::after {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.page-hero.section:has(+ .social-tabs) h1 {
  max-width: 920px;
  letter-spacing: 0;
}

.page-hero.section:has(+ .social-tabs) #social-user-id {
  max-width: 760px;
  padding: 12px 14px;
  border: 1px solid rgba(215, 25, 32, 0.12);
  border-radius: 16px;
  color: color-mix(in srgb, var(--gray) 84%, var(--black));
  background: rgba(215, 25, 32, 0.055);
  font-weight: 800;
}

.section.social-tabs {
  position: sticky;
  top: calc(var(--header-height, 76px) + 8px);
  z-index: 8;
  width: min(1480px, calc(100% - 32px));
  margin-bottom: 18px;
  padding: 10px;
  overflow-x: auto;
  border: 1px solid rgba(11, 11, 13, 0.08);
  border-radius: 20px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: 0 22px 54px rgba(11, 11, 13, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  scrollbar-width: none;
}

.section.social-tabs::-webkit-scrollbar {
  display: none;
}

body.dark-mode .section.social-tabs {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(18, 18, 21, 0.82);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.32);
}

.social-tabs .btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding-inline: 16px;
  border-radius: 14px;
  border-color: transparent;
  box-shadow: none;
}

.social-tabs .btn-secondary {
  background: transparent;
}

.social-tabs .btn-primary {
  color: #ffffff;
  background:
    linear-gradient(135deg, #ff4f57 0%, var(--red) 54%, #7f1118 100%);
  box-shadow: 0 14px 34px rgba(215, 25, 32, 0.25);
}

.section.social-layout {
  padding-top: 0;
}

.social-panel {
  position: relative;
  overflow: hidden;
}

.social-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background:
    linear-gradient(90deg, var(--red), #20c76a, #2f80ed);
}

.social-panel > h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 0;
  margin-bottom: 18px;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
}

.messages-panel.is-active {
  padding: clamp(14px, 2vw, 22px);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(247, 247, 249, 0.78));
}

body.dark-mode .messages-panel.is-active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.028));
}

.messages-layout {
  min-height: min(760px, calc(100vh - 210px));
  gap: clamp(14px, 1.5vw, 22px);
}

.message-people {
  align-content: stretch;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  padding: 14px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 247, 249, 0.82));
}

#message-people-list {
  overflow: auto;
  padding-right: 2px;
}

.message-people input,
#friends-search,
#friend-id-input,
#group-name-input,
#group-description-input,
#message-article-search {
  min-height: 46px;
  border-radius: 14px;
  border-color: rgba(11, 11, 13, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 247, 249, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.dark-mode .message-people input,
body.dark-mode #friends-search,
body.dark-mode #friend-id-input,
body.dark-mode #group-name-input,
body.dark-mode #group-description-input,
body.dark-mode #message-article-search {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.055);
}

.message-person-row {
  position: relative;
  padding: 5px;
  border-radius: 22px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.message-person-row:hover,
.message-person-row.is-active {
  background: rgba(215, 25, 32, 0.065);
}

.message-person-row.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 4px;
  border-radius: 999px;
  background: var(--red);
}

.message-person {
  min-height: 92px;
  border-color: transparent;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
}

.message-person-row.is-active .message-person,
.message-person.is-active,
.message-person-row:hover .message-person {
  border-color: transparent;
  box-shadow: none;
}

.message-person .presence-avatar {
  width: 58px;
  height: 58px;
}

.message-profile-link {
  min-width: 48px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
}

.message-conversation {
  min-height: 0;
  padding: 12px;
  border: 1px solid rgba(11, 11, 13, 0.08);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 247, 249, 0.76));
}

body.dark-mode .message-conversation {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

#message-thread {
  min-height: 0;
  max-height: none;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(247, 247, 249, 0.58));
}

.chat-head {
  align-items: center;
  border-bottom-color: rgba(11, 11, 13, 0.07);
  box-shadow: 0 16px 30px rgba(11, 11, 13, 0.06);
}

.chat-head-profile h3 {
  line-height: 1.1;
}

.chat-block-button {
  border-radius: 999px;
  background: rgba(215, 25, 32, 0.07);
}

.message {
  max-width: min(760px, 74%);
  margin-block: 12px;
  padding: 12px 14px;
  border-radius: 22px 22px 22px 8px;
  animation: message-rise 0.24s ease both;
}

.message.mine {
  border-radius: 22px 22px 8px 22px;
  box-shadow: 0 16px 34px rgba(215, 25, 32, 0.22);
}

@keyframes message-rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-composer-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.message-tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 24px rgba(11, 11, 13, 0.06);
}

.message-tool-button:hover,
.message-tool-button:focus-visible {
  border-color: var(--red);
  color: var(--red);
  transform: translateY(-1px);
}

#message-image-button::before {
  content: "+";
}

#message-link-button::before {
  content: "↗";
}

#message-article-button::before {
  content: "◆";
}

#message-input {
  min-height: 74px;
  max-height: 180px;
  resize: vertical;
  border-radius: 22px;
  background: var(--panel);
}

#send-message-button {
  min-height: 48px;
  border-radius: 999px;
  box-shadow: 0 16px 34px rgba(215, 25, 32, 0.22);
}

.message-article-picker {
  border-radius: 22px;
  box-shadow: 0 22px 44px rgba(11, 11, 13, 0.08);
}

.article-picker-result,
.group-invite-option,
.group-card,
.group-create-panel,
.friend-row {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.article-picker-result:hover,
.group-invite-option:hover,
.group-card:hover,
.friend-row:hover {
  transform: translateY(-1px);
  border-color: rgba(215, 25, 32, 0.18);
  box-shadow: 0 18px 42px rgba(11, 11, 13, 0.08);
}

.friend-row {
  border-radius: 22px;
}

.friend-row .btn {
  border-radius: 999px;
}

.request-lists > div,
.blocked-users-panel,
.group-create-panel {
  border-radius: 24px;
}

.group-create-panel {
  padding: clamp(14px, 2vw, 20px);
}

.group-card {
  border-radius: 22px;
}

.empty-state {
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(215, 25, 32, 0.045), rgba(32, 199, 106, 0.035));
}

@media (max-width: 980px) {
  .page-hero.section:has(+ .social-tabs) {
    grid-template-columns: 1fr;
  }

  .page-hero.section:has(+ .social-tabs)::after {
    justify-self: stretch;
    width: auto;
  }

  .section.social-tabs {
    top: 8px;
  }

  .messages-layout {
    min-height: auto;
  }

  .message-conversation {
    min-height: 64vh;
  }
}

@media (max-width: 760px) {
  .page-hero.section:has(+ .social-tabs) {
    width: min(100% - 24px, 680px);
    padding-top: 34px;
  }

  .page-hero.section:has(+ .social-tabs)::after {
    display: none;
  }

  .section.social-tabs,
  .section.social-layout {
    width: calc(100% - 20px);
  }

  .social-tabs .btn {
    flex: 0 0 auto;
    min-width: max-content;
  }

  .messages-panel.is-active,
  .message-conversation,
  .message-people {
    border-radius: 20px;
  }

  .message {
    max-width: 94%;
  }

}

#download-library-grid .feature-card:hover,
#download-library-grid .feature-card:focus-within {
  transform: none;
}

#download-library-grid .download-library-card-image {
  width: 100%;
  margin: 0 0 16px;
  border-radius: 8px;
}

/* Motion off + compact social hero */
html {
  scroll-behavior: auto !important;
}

*,
*::before,
*::after {
  animation-duration: 0.001ms !important;
  animation-delay: 0s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0s !important;
  transition-delay: 0s !important;
}

.page-hero.section:has(+ .social-tabs) {
  display: block;
  width: min(1480px, calc(100% - 32px));
  padding-top: 32px;
  padding-bottom: 18px;
}

.page-hero.section:has(+ .social-tabs)::after,
.page-hero.section:has(+ .social-tabs) h1 {
  content: none;
  display: none;
}

.page-hero.section:has(+ .social-tabs) .eyebrow {
  margin-bottom: 12px;
}

.page-hero.section:has(+ .social-tabs) #social-user-id {
  margin-top: 0;
}

.section.social-tabs {
  top: calc(var(--header-height, 76px) + 4px);
}

@media (hover: none) {
  .feature-card:hover,
  .category-card:hover,
  .post-card:hover,
  .nav-links a:hover,
  .site-search-toggle:hover,
  .btn:hover {
    transform: none;
  }

}

@media (max-width: 1180px) {
  .article-mobile-rail {
    top: calc(env(safe-area-inset-top, 0px) + 86px);
    right: max(12px, env(safe-area-inset-right, 0px));
    z-index: 120;
  }

  .article-mobile-drawer {
    z-index: 119;
  }
}

@media (max-width: 560px) {
  .article-mobile-rail {
    top: calc(env(safe-area-inset-top, 0px) + 78px);
    right: max(10px, env(safe-area-inset-right, 0px));
    width: 44px;
    height: 44px;
  }

  .media-align-control {
    grid-template-columns: 38px repeat(3, minmax(0, 1fr)) 38px;
    gap: 6px;
  }

  .media-align-control button {
    min-height: 40px;
    padding: 7px 8px;
    font-size: 0.78rem;
  }
}

/* Safer wide navigation */
.navbar {
  width: min(1760px, calc(100% - 24px));
  min-height: 78px;
  gap: clamp(10px, 1vw, 18px);
}

.logo {
  flex: 0 0 auto;
  font-size: clamp(1.18rem, 1.15vw, 1.42rem);
}

.nav-links {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
  gap: clamp(6px, 0.7vw, 14px);
  margin-left: clamp(4px, 0.8vw, 16px);
  font-size: clamp(0.76rem, 0.72vw, 0.88rem);
}

.nav-links li {
  min-width: 0;
}

.nav-links a {
  max-width: 100%;
  min-height: 38px;
  padding: 8px clamp(9px, 0.78vw, 14px);
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}

.header-actions {
  flex: 0 0 auto;
  min-width: max-content;
}

.site-search-field {
  right: 58px;
}

.site-search.is-open .site-search-field,
.site-search:focus-within .site-search-field {
  width: min(280px, 20vw);
}

@media (min-width: 1181px) and (max-width: 1380px) {
  .navbar {
    width: min(100% - 16px, 1380px);
  }

  .nav-links {
    gap: 4px;
    font-size: 0.74rem;
  }

  .nav-links a {
    padding-inline: 8px;
  }

  .header-actions {
    gap: 6px;
  }

  .login-button {
    padding-inline: 12px;
  }
}

@media (max-width: 1180px) {
  .navbar {
    width: min(100% - 20px, 980px);
  }
}

/* Dark social typography fixes */
.social-layout,
.social-layout *,
.social-tabs,
.social-tabs * {
  font-family: "Inter", Arial, sans-serif;
}

#message-image-button::before,
#message-link-button::before,
#message-article-button::before {
  content: none;
}

body.dark-mode .message-tool-button {
  color: #f7f7f8;
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

body.dark-mode .message-tool-button:hover,
body.dark-mode .message-tool-button:focus-visible {
  color: #ffffff;
  background: rgba(215, 25, 32, 0.18);
  border-color: rgba(255, 120, 126, 0.38);
}

body.dark-mode .message-article-card,
body.dark-mode .message:not(.mine) .message-article-card {
  color: #f7f7f8;
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.14);
}

body.dark-mode .message-article-card small {
  color: rgba(247, 247, 248, 0.74);
}

body.dark-mode #message-input {
  color: #f7f7f8;
  background: rgba(10, 10, 13, 0.72);
  border-color: rgba(255, 255, 255, 0.22);
}

body.dark-mode #message-input::placeholder {
  color: rgba(247, 247, 248, 0.56);
}

/* Wider, opaque dark chat layout */
.section.social-layout {
  width: min(1680px, calc(100% - 24px));
}

.social-layout .messages-panel.is-active {
  max-width: min(1640px, 100%);
}

.messages-layout {
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  min-height: 560px;
}

.message-conversation {
  grid-template-rows: minmax(320px, 52vh) auto auto auto;
}

#message-thread {
  min-height: 320px;
  max-height: 52vh;
}

body.dark-mode .messages-panel.is-active {
  background: #101014;
  border-color: #27272f;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.46);
}

body.dark-mode .message-people,
body.dark-mode .message-conversation,
body.dark-mode #message-thread {
  background: #15151a;
  border-color: #2f3038;
  box-shadow: none;
}

body.dark-mode .message-person-row:hover,
body.dark-mode .message-person-row.is-active {
  background: #22191d;
}

body.dark-mode .message-person {
  background: #191a20;
}

body.dark-mode .chat-head {
  background: #15151a;
  border-bottom-color: #2f3038;
  box-shadow: none;
}

body.dark-mode .message {
  background: #22232a;
  border-color: #343640;
}

body.dark-mode .message.mine {
  background: linear-gradient(135deg, #ef444b 0%, #d71920 56%, #9f1118 100%);
  border-color: rgba(255, 118, 124, 0.28);
}

.section.social-tabs {
  position: static;
  top: auto;
}

@media (max-width: 980px) {
  .messages-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .message-conversation {
    grid-template-rows: minmax(320px, 54vh) auto auto auto;
  }

  #message-thread {
    max-height: 54vh;
  }
}

body.dark-mode .group-invite-option.is-selected {
  border-color: rgba(244, 40, 51, 0.7);
  background: #241317;
  box-shadow: 0 18px 38px rgba(215, 25, 32, 0.16);
}

/* Final cross-browser overrides kept last for older selector engines */
.navbar.has-focus-search .nav-links {
  gap: clamp(10px, 1vw, 16px);
  transform: none;
}

.navbar.has-focus-search .header-actions {
  min-width: min(440px, 34vw);
}

body.has-editor-form .page-hero {
  padding-top: clamp(18px, 3vw, 34px);
  padding-bottom: clamp(24px, 4vw, 38px);
}

body.has-editor-form .page-hero h1 {
  max-width: 760px;
  margin: 8px 0 12px;
  font-size: clamp(1.9rem, 3.2vw, 3.2rem);
  line-height: 1.05;
}

body.has-editor-form .page-hero p:not(.eyebrow) {
  max-width: 620px;
  font-size: 1rem;
}

.calc-field.has-number-input {
  display: none;
}

.group-invite-option.is-selected {
  border-color: rgba(215, 25, 32, 0.55);
  background: linear-gradient(180deg, rgba(255, 242, 243, 0.98), rgba(255, 232, 234, 0.94));
  box-shadow: 0 18px 38px rgba(215, 25, 32, 0.13);
}

.group-invite-option.is-selected::after {
  content: "Se\00e7ildi";
  background: linear-gradient(180deg, var(--red), var(--red-dark));
  color: #fff;
}

body.social-page .page-hero.section {
  display: block;
  width: min(1480px, calc(100% - 32px));
  padding-top: 32px;
  padding-bottom: 18px;
}

body.social-page .page-hero.section::after,
body.social-page .page-hero.section h1 {
  content: none;
  display: none;
}

body.social-page .page-hero.section .eyebrow {
  margin-bottom: 12px;
}

body.social-page .page-hero.section #social-user-id {
  max-width: 760px;
  margin-top: 0;
  padding: 12px 14px;
  border: 1px solid rgba(215, 25, 32, 0.12);
  border-radius: 16px;
  color: var(--gray);
  background: rgba(215, 25, 32, 0.055);
  font-weight: 800;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav-submenu,
  .search-suggestions,
  .section.social-tabs,
  .auth-box {
    background: #111114;
  }

  body:not(.dark-mode) .search-suggestions,
  body:not(.dark-mode) .section.social-tabs {
    background: #ffffff;
  }
}

@supports not (color: color-mix(in srgb, red 50%, white)) {
  .section.social-tabs {
    background: rgba(255, 255, 255, 0.94);
  }

  body.dark-mode .section.social-tabs {
    background: rgba(18, 18, 21, 0.92);
  }
}

@media (max-width: 760px) {
  .navbar.has-focus-search .header-actions {
    min-width: 0;
  }

  .site-search.is-open .site-search-field,
  .site-search:focus-within .site-search-field {
    width: min(300px, calc(100vw - 92px));
  }
}

@media (max-width: 480px) {
  .section,
  .page-hero,
  .exercise-atlas-page .section {
    width: min(100% - 20px, 100%);
  }

  .header-social-links {
    display: none;
  }
}
body.dark-mode .group-invite-option.is-selected {
  border-color: rgba(244, 40, 51, 0.7);
  background: #241317;
  box-shadow: 0 18px 38px rgba(215, 25, 32, 0.16);
}
